[Interest] sliding panel windows (was Re: Moving a frameless QQuickWindow to negative position under linux)

Rutledge Shawn Shawn.Rutledge at digia.com
Wed Aug 13 10:19:12 CEST 2014


On 13 Aug 2014, at 5:33 AM, hualet wrote:

> Hi, all
> There’s a frameless QQuickWindow which contains my actual qml content stuff in my application, and I just used the setX() and setY() method of that window to simulate moving, but it’s not able to move that window to an negative position, such as (-100, -100), please help, thanks.

Are you trying to get the sliding-panel effect, so you wanted to slide the window offscreen?  I'm interested in that too.

In general, the success of explicitly setting window geometry depends on your window manager.  It's never guaranteed: X11 policy is that it's just a suggestion.  (As we are discussing in another thread, on Wayland it seems windows cannot be moved programmatically at all: only the user can do it, interactively.  Therefore we should de-emphasize such use cases, because they are not guaranteed to work.)  I did experiments with animating window position and found that OpenBox allows a lot more than KWin does, for example.  Then I was wondering if there could be a way to have a window which is virtually its maximum size all the time but becomes transparent when retracted, and also lets through the mouse events etc.  Because even if the WM allows animating position (or size), there is no guarantee that it will be done at a high enough frame rate to look good.  It's ironic that the animations are so trivial to write in QML and yet work so poorly.  It may not be possible to have that method working well.

KDE can have auto-hide panels.  I looked at the panel window with xprop, and the prop that looks interesting is

_KDE_SLIDE(_KDE_SLIDE) = 0xffffffff, 0x0

I asked on IRC and someone mentioned that this app does the slide-down effect:

http://extragear.kde.org/apps/yakuake/

Its FAQ says that newer versions of kwin can be asked to do the animation, whereas with older versions it's necessary to grow or shrink the window's mask.   QXcbWindow::setMask uses the X11 "shaped window" extension to do that.  But compositing makes possible antialiased edges and 60FPS animation, so that should be better.

_KDE_SLIDE seems to be the way of doing that on KDE:

https://www.mail-archive.com/plasma-devel@kde.org/msg06359.html

and probably setting the mask would work on at least some of the other platforms.

I was going to write some other ideas for the ultimate solution that I can think of so far, but I guess I have to prove it with a good mockup before discussing it further.



More information about the Interest mailing list