Patch for bringing back the MeeGo-style close gesture (swipe from top)
As the title suggests, after a little digging around I figured out a way to bring back the MeeGo-style closing gesture — swipe from any place of the top edge when there is an application on the foreground closes said application — to the Sailfish 3.
The Top Menu is still there unchanged and can be accessed by any other way (top to bottom swipe on the home screen, notifications area or lockscreen or just a tap on the status bar).
Since I'm too lazy to create openrepos package, I will just post the instructions here. All you need to do is edit /usr/share/lipstick-jolla-home-qt5/compositor.qml
The first line we're interested in is line 896
for 3.1.0:
update for 3.2 line number is 905
topAcceptMargin: Math.max(QtQuick.Screen.pixelDensity * 10, (largeScreen ? (SS.Screen.width - topMenuLayer.exposedArea.width) / 2 : Theme.itemSizeMedium))
What it does is set the areas dragging down from which triggers the closing gesture. So, as quick and dirty solution — just make it equal to the screen width.
topAcceptMargin: SS.Screen.width
And another line is 1279
for 3.1.0:
update for 3.2: line 1290
|| appLayerItem.active
If you scroll a bit higher you'll see that it is a single item in the list of possible variants for opening the top menu. Since we don't need it to open when trying to close the running app, that line can be just deleted.
And that's it.
Here are the diff file and the modified compositor.qml (it uploaded as .gz but it's actually .tar.gz). If anybody wants to create a full openrepos or patchmanager patch package — they're welcome.
thx for your work :) You can create a Patchamanger Patch very easy, no need to create rpms. Just rename your diff, zip it and upload it. Instructions are here: Patchmanager Web
jayki ( 2019-01-05 16:43:18 +0200 )editWas waiting for that! Thanks!
stephan ( 2019-01-05 21:50:33 +0200 )editAh - seems like my OS will become usable again... What a relief. ;)
ossi1967 ( 2019-01-06 12:17:05 +0200 )editCorresponding lines in Xperia X (F5122) seem to be 793 and 1163.
japsi ( 2019-01-06 14:59:51 +0200 )editErrr... I use Xperia X image too but it was exactly the lines i mentioned in my message. Maybe something to do with text wrapping?
Just in case — if you refer to the line numbering in the attached file, please note that the attached archive is actually .tar.gz, not just a .gz. Since tar just jams files together, if you open it as is, you'll just see the diff and the compositor.qml in a single file.
figgis-diggis ( 2019-01-06 15:21:58 +0200 )edit