Bug 367894 - On GTK apps Windows drag mode incorrectly drags from non titlebar area
Summary: On GTK apps Windows drag mode incorrectly drags from non titlebar area
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: gtk2-engine (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-27 12:05 UTC by delshole
Modified: 2016-09-08 08:52 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description delshole 2016-08-27 12:05:25 UTC
Just upgraded to Kubuntu Xenial. No issue prior to that.

The Widget style configuration dialog has a "Windows drag mode" option which I've set to "Drag windows from titlebar only". But with GTK apps it always behaves as if this setting is set to "Drag windows from titlebar, menubar and toolbars". I've tried it with Firefox, Chrome, Pidgin, Geeqie, Audacity, and many other GTK applications. Firefox is the one which causes me trouble though, because the area shown here:

https://bugsfiles.kde.org/attachment.cgi?id=100778

is the area a Firefox user can double click in order to create a new tab.

I'm using Oxygen style, but Breeze and the others do it too. My GNOME Application Style (GTK) is set to oxygen-gtk, but trying the other options doesn't solve it.

Reproducible: Always

Steps to Reproduce:
1. System settings->Application Style->Oxygen->Configure->Windows drag mode, set to Drag windows from titlebar only
2. Start Firefox, double click on empty menu bar area or empty area next to tabs

Actual Results:  
Cursor changes to 4 way arrow and the window can be moved. 

Expected Results:  
The double click should be passed to the application so it creates a new tab.

I thought this was a duplicate of 352986, but apparently not.

I'm guessing it's a kwin bug, but I really don't know what component is responsible. Could be something to do with GTK interaction?
Comment 1 Martin Flöser 2016-08-27 15:15:55 UTC
No, that's not a KWin bug. The toolkit sends a move request to KWin and KWin honors that. It might be that this is a bug in oxygen-gtk, it might also be that this is the intended behavior of GTK. In that case you would have to report the bug against GTK.
Comment 2 Ruslan Kabatsayev 2016-08-27 15:20:34 UTC
Are both GTK2 and GTK3 apps affected? Which apps exactly?
Comment 3 Ruslan Kabatsayev 2016-08-27 15:21:31 UTC
Ah sorry, I see some mentioned in the OP. These are GTK2.
Comment 4 Ruslan Kabatsayev 2016-08-27 15:31:23 UTC
OK, apparently Oxygen-Qt has changed the way it handles its config. Previously there was [Style]/WindowDragEnabled, which you could set to false in ~/.kde/share/config/oxygenrc. Now this option seems to have been dropped, and a new mode has been added: WD_NONE.

To work around this problem, in ~/.kde/share/config/oxygenrc after
WindowDragMode=WD_NONE

add this:

WindowDragEnabled=false
Comment 5 delshole 2016-08-27 17:50:47 UTC
Making that change then logging out and back in again didn't make any difference. The file is now:

>cat ~/.kde/share/config/oxygenrc
[$Version]
update_info=oxygen.upd:1

[Common]
UseBackgroundGradient=true

[Style]
ScrollBarWidth=15
WindowDragMode=WD_NONE
WindowDragEnabled=false


Some searches suggested the same line can also appear in the .config file:

>cat ~/.config/oxygenrc
[Common]
UseBackgroundGradient=true

[Style]
ScrollBarWidth=15
WindowDragMode=WD_NONE
WindowDragEnabled=false

I don't know if that's relevant anymore, but I tried it. It didn't change anything either.
Comment 6 Ruslan Kabatsayev 2016-08-27 18:00:39 UTC
Can you confirm that this problem appears despite this line being present in ~/.kde/share/config/oxygenrc in KDE session while using oxygen-gtk with pidgin? I can't reproduce this in Kubuntu Xenial live image run in QEMU. For me this line "fixes" the problem.
Comment 7 delshole 2016-08-27 18:15:46 UTC
Adding the line to ~/.kde/share/config/oxygenrc does fix the problem for Pidgin and Geeqie, but it does not fix it for Firefox, Chrome or Thunderbird.
Comment 8 Ruslan Kabatsayev 2016-08-27 18:20:26 UTC
Firefox, Chrome and Thunderbird are not real GTK programs. Oxygen-GTK can't force such behavior in these apps even when it wants to.
This must be a problem in something else (maybe some Kubuntu-specific plugins for XUL and something in Chrome/Chromium).
Comment 9 Hugo Pereira Da Costa 2016-09-08 08:50:52 UTC
Git commit 06ac09ba9196d9968feefae294b6b361fb26cfd6 by Hugo Pereira Da Costa.
Committed on 08/09/2016 at 08:50.
Pushed by hpereiradacosta into branch 'Plasma/5.7'.

Re-added WindowDragEnabled, for backward compatibility with oxygen-gtk

M  +1    -0    kstyle/config/oxygenstyleconfig.cpp
M  +5    -0    kstyle/oxygen.kcfg

http://commits.kde.org/oxygen/06ac09ba9196d9968feefae294b6b361fb26cfd6
Comment 10 Hugo Pereira Da Costa 2016-09-08 08:50:52 UTC
Git commit f8e1bb11435881a5e0e8dd0ed3aa1321a5a742f3 by Hugo Pereira Da Costa.
Committed on 08/09/2016 at 08:48.
Pushed by hpereiradacosta into branch 'master'.

Re-added WindowDragEnabled, for backward compatibility with oxygen-gtk

M  +1    -0    kstyle/config/oxygenstyleconfig.cpp
M  +5    -0    kstyle/oxygen.kcfg

http://commits.kde.org/oxygen/f8e1bb11435881a5e0e8dd0ed3aa1321a5a742f3
Comment 11 Hugo Pereira Da Costa 2016-09-08 08:52:33 UTC
Hello,
Thanks for reporting.
This is now fixed. I have not modified oxygen-gtk, which is basically 'done' in the sense that it will not have any new releases because of gtk3 having it broken upstream. Instead I have re-added the removed "WindowDragEnabled" option, for backward compatibility with past releases.

Sorry for the trouble.
Best,

Hugo