Ask / Submit

Patch for bringing back the MeeGo-style close gesture (swipe from top)

asked 2019-01-05 14:18:37 +0300

figgis-diggis gravatar image

updated 2019-01-08 16:00:15 +0300

rozgwi gravatar image

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 786 (885 for - Sipoonkorpi):

topAcceptMargin: 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 1156 (1257 for Sipoonkorpi):


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.

edit retag flag offensive close delete



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 +0300 )edit

Was waiting for that! Thanks!

stephan ( 2019-01-05 21:50:33 +0300 )edit

Ah - seems like my OS will become usable again... What a relief. ;)

ossi1967 ( 2019-01-06 12:17:05 +0300 )edit

Corresponding lines in Xperia X (F5122) seem to be 793 and 1163.

japsi ( 2019-01-06 14:59:51 +0300 )edit

Errr... 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 +0300 )edit

1 Answer

Sort by » oldest newest most voted

answered 2019-01-10 02:15:06 +0300

rozgwi gravatar image

updated 2019-02-09 12:26:17 +0300

Thanks a bunch figgis-diggis!
With a little help from @Edz (yes I saw that comment ;p ) and @coderus I was able to convert this into a patch for PM3. It's been tested on Sailfish X (Xperia X)
Since I don't know when I'll be able to put it up to the web catalog here it is:


    "name": "close-gesture",
    "display_name": "Close gesture 'revived'",
    "description": "Bring back the classic (MeeGo/SFOS 2) close gesture for SFOS 3.0 with the new Top-Menu available only from Events View and Homescreen.\r\nOriginal work by figgis-diggis@TJC",
    "category": "homescreen",
    "version": "0.0.1",
    "compatible": ["",""]


--- /usr/share/lipstick-jolla-home-qt5/compositor.qml
+++ /usr/share/lipstick-jolla-home-qt5/compositor.qml
@@ -882,7 +882,7 @@
                             rightEnabled: Desktop.startupWizardRunning
                             topEnabled: !Desktop.startupWizardRunning && !
                             // Minimum top accept margin is 10mm
-                            topAcceptMargin: Math.max(QtQuick.Screen.pixelDensity * 10, (largeScreen ? (SS.Screen.width - topMenuLayer.exposedArea.width) / 2 : Theme.itemSizeMedium))
+                            topAcceptMargin: SS.Screen.width

                         onAboutToShowWindow: {
@@ -1254,7 +1254,6 @@
                              && DeviceLock.state <= DeviceLock.Locked
                              && (
-                                 ||
                                  || alarmLayerItem.inCall
edit flag offensive delete publish link more


Possible conflicts on my Xperia X: Volume control settings patch.

eson ( 2019-01-10 10:23:47 +0300 )edit

I have that patch too. Works though, even with Top menu content enabled in addition

rozgwi ( 2019-01-10 12:52:24 +0300 )edit

Yep, works for me to. It was just a notation for possible conflicts.

eson ( 2019-01-10 20:06:32 +0300 )edit

Very nice! Thank you too.

figgis-diggis ( 2019-01-11 06:18:52 +0300 )edit

Thanks for posting this. Apologies if I have overlooked something simple, but I cannot figure out how to apply those files to PM3. Is there a way to apply local patch files to PM3 that I have missed?

Drekkie ( 2019-01-16 19:34:50 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2019-01-05 14:18:37 +0300

Seen: 1,479 times

Last updated: Feb 09