[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Disabling Oxygen's window dragging for specific QWidgets?
From:       Hugo Pereira Da Costa <hugo () oxygen-icons ! org>
Date:       2011-05-13 16:41:50
Message-ID: 4DCD5F4E.70508 () oxygen-icons ! org
[Download RAW message or body]

Hello Nikos,
> I noticed that when running in KDE and using the Oxygen style, the
> windows of my Qt application can be dragged around with the mouse by
> clicking on any area in the window, not just the title bar.  But it
> behaves strange in my application: window dragging only works in parts
> of the window that have nothing in them yet.
>
Yes. That's the intended behavior of the feature.
"Drag window from empty areas".

> Note that dragging in those areas shouldn't be possible to begin with.
"To begin with", Why so ? This feature was asked by several people, 
already supported in other styles (bespin, qtcurve), accepted inside 
kde, and added to oxygen since kde4.5. Also, it can be disabled in the 
front page of "oxygen-settings".

> So the question is: is there a way I can disable this for specific QWidgets?
>
> If you wonder about the details of my situation: I use a QScrollArea to
> display a QWidget (where I'm drawing stuff using custom painting).  When
> the QWidget is small and doesn't yet fill the entire QScrollArea, the
> not yet filled areas are "draggable".  When the QWidget expands and
> covers these areas, window dragging stops working.
>
Again that's the expected behavior, that users, used to the feature 
above, expect, since the not yet covered part of the scrolled area, is 
considered empty.

You can disable the feature on a per widget basis by catching the 
mouse-press event, and *not* passing them to the parent widget. But I 
would think it is not a good idea, since it would break consistency with 
other apps. Better leave it to the user to decide whether to 
enable/disable the feature, system-wise.

The "unexpected" behavior would be when the window starts to being 
dragged where a mouse-click (and move and drag) would otherwise be used 
for "something else", for instance: click on a button, drag a spliter, a 
slider, a scrollbar; move a subwidget, or icon, around, or select item 
in a list.

If the "strange" behavior you mention covers one of the above (namely, 
if the window dragging conflicts with another action and prevents you to 
do this action), then it's a bug and should be reported to bugs.kde.org, 
so that it gets fixed (most likely by me :))

I hope this clarifies the situation,

Hugo
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic