Bug 352986 - Plasma Widget Configuration Dialogue ignores Breeze Windows' Drag mode
Summary: Plasma Widget Configuration Dialogue ignores Breeze Windows' Drag mode
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.4.1
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-21 13:57 UTC by Ralf Jung
Modified: 2016-12-06 15:38 UTC (History)
5 users (show)

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


Attachments
Firefox tab area (10.16 KB, image/png)
2016-08-26 08:44 UTC, delshole
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Jung 2015-09-21 13:57:01 UTC
The configuration windows of Plasma widget ignore the Breeze theme setting "Windows' Drag Mode", which I set to "Drag windows from titlebar only".

Reproducible: Always

Steps to Reproduce:
1. In Application Settings - Widget Style, open the Breeze configuration and set the "Windows' Drag Mode" to "Drag windows from titlebar only".
2. Open the configuration window of a Plasma widget
3. Drag'n'drop somewhere in its empty area, or in the lower part of the panel selection thing at the left

Actual Results:  
The window gets moved.

Expected Results:  
The window shouldn't get moved. All other windows I tried so far follow the configuration, and get moved only when being dragged at their titelbar.
Comment 1 Kai Uwe Broulik 2016-02-03 22:14:21 UTC
Looks like a Breeze widget theme bug. While I can imagine it not being able to tell the difference between toolbars and rest of the window (second option) because it's QtQuick it should at least know the difference between the window decoration and the window content. Hugo?
Comment 2 Hugo Pereira Da Costa 2016-02-03 23:00:23 UTC
can you check with another widget theme that does not support window dragging ? (e.g. fusion) ? 
if it still drags, then it is not breeze :)
Comment 3 Kai Uwe Broulik 2016-02-03 23:25:27 UTC
Too bad :) Also happens with Fusion. It does not work when the applet is run in plasmoidviewer, though.
Comment 4 Hugo Pereira Da Costa 2016-02-04 00:22:13 UTC
ok. So seems like a 'feature' of QtQuick in fact 
That was my original guess, because the dragging from QtQuick do not pass by kwin for instance (and don't call effects such as wobbly, which breeze's dragging does). 
Sorry for asking for test rather than testing directly, it's just that I was not on the right machine to do so. 
In any case this is also why it does not respect breeze's own custom settings. (neither oxygen's for that matter).  
I have no clue how to fix. (this would required some standardization of options I guess).
Comment 5 Kai Uwe Broulik 2016-02-27 15:41:50 UTC
Ha! I found it!

In the AppletConfiguration QML there's the following code:

    MouseEventListener {
        anchors.fill: parent
        property int oldX
        property int oldY
        onPressed: {
            oldX = mouse.screenX
            oldY = mouse.screenY
        }
        onPositionChanged: {
            configDialog.y += mouse.screenY - oldY
            configDialog.x += mouse.screenX - oldX
            oldX = mouse.screenX
            oldY = mouse.screenY
        }
    }

Not sure we can do a lot about this in a sense of following the widget theme settings and everything :/ Perhaps we could make a wrapper that works fine for Breeze and uses X window resize mode and everything but I don't know whether it's worth it.
Comment 6 delshole 2016-08-26 08:44:31 UTC
Created attachment 100778 [details]
Firefox tab area

Screenshot section clarifying Firefox tab area (the area where the mouse pointer is on the this screenshot).
Comment 7 delshole 2016-08-26 08:49:17 UTC
I've just upgraded Kubuntu and am now hitting this. It's causing a problem because I'm totally used to double clicking on the empty area to the right of the Firefox tab bar (see attachment) in order to get a new tab. KDE is now grabbing this click and "offering" to move the window. Years of this habit are proving hard to break!

If it can't be easily fixed, can we have an option to switch off that window drag feature (or at least ignore double clicks?) and just pass the click to the application?
Comment 8 Hugo Pereira Da Costa 2016-08-26 09:10:26 UTC
@deshole

Sorry to say, but comments 6 and 7 are quite unrelated to this bug.
Bug refers to plasma QML widgets while your issue is related to Firefox, which in turn uses gtk as a backend.
Could you actually check which widget style is used for firefox (and other gtk2 applications) ? on your system ?
Comment 9 delshole 2016-08-27 12:07:02 UTC
Um, OK, it's hard for the lay person to tell what causes what. I filed a new bug, 367894, against Kwin.
Comment 10 David Rosca 2016-12-06 15:38:00 UTC
Git commit e9abd83d02b309090075fe46790bd3637c765f09 by David Rosca.
Committed on 06/12/2016 at 15:33.
Pushed by drosca into branch 'master'.

AppletConfiguration: Remove custom handling of moving window

Breeze now handles moving QtQuickControls windows too.
FIXED-IN: 5.9.0

Differential Revision: https://phabricator.kde.org/D3607

M  +0    -17   desktoppackage/contents/configuration/AppletConfiguration.qml

https://commits.kde.org/plasma-desktop/e9abd83d02b309090075fe46790bd3637c765f09