Bug 87212 - Window movement does not honour StaticGravity
Summary: Window movement does not honour StaticGravity
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-14 18:22 UTC by Billy Biggs
Modified: 2004-08-16 16:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Billy Biggs 2004-08-14 18:22:02 UTC
Version:            (using KDE KDE 3.2.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

The following small C program runs a loop where it uses XTranslateCoordinates to look up the position of its window, and uses XMoveResizeWindow to move it to the same location:

  http://vektor.ca/bugs/movewindow.c

Use './movewindow static' to set the window to use StaticGravity, and './movewindow northwest' to set the window to use NorthWestGravity,

Under kwin version 3.2.2, using NorthWestGravity causes the window to stay in the same spot.  With StaticGravity, the window moves diagonally by the size of the window frame every time.  This seems backwards.  Searches seem to indicate that it should always stay put with StaticGravity.  Here is a survey of what happens with some other window managers:

Stays put with StaticGravity:
 - metacity 2.8.1, OpenBox 3.2, twm from XFree86 4.3, fvwm 1.24r, fvwm 2.5.10

Stays put with NorthWestGravity:
 - kwin 3.2.2, fvwm 1.24r, fvwm 2.5.10

Moves around with NorthWestGravity:
 - metacity 2.8.1, OpenBox 3.2, twm from XFree86 4.3

Moves around with StaticGravity
 - kwin 3.2.2

While WMs seem split over what to do under NorthWestGravity, everyone but kwin seems to agree on StaticGravity.  I believe this is therefore a bug in kwin.
Comment 1 Billy Biggs 2004-08-14 20:35:13 UTC
I'm sorry, kwin is not alone.  The OS X window manager moves around with _both_ NorthWestGravity and StaticGravity.  Is this WM broken in a new and different way?
Comment 2 Lubos Lunak 2004-08-16 15:32:38 UTC
The fact that the window doesn't move if it requests the same position with NorthWest gravity is a feature. There are applications like XV which request positioning on the same place this way, so KWin ignores such requests, and I don't think there are cases when any app would request position in such way and wouldn't be broken. NorthWest positioning with different position works in KDE3.3.0 as specified by ICCCM, just like other gravities. I'm not sure if it has worked in KDE3.2.3, but as there is no 3.2.4 planned -> closing.
Comment 3 Billy Biggs 2004-08-16 16:03:19 UTC
I understand the situation with NorthWestGravity, but my concern here is purely about StaticGravity.  It does not seem to be behaving correctly in kwin 3.2.2.  Can you confirm that it is broken, or check if my sample application does not move with StaticGravity under kwin in 3.3.0?
Comment 4 Lubos Lunak 2004-08-16 16:17:53 UTC
As I said, StaticGravity works in 3.3.0. Note also that keeping normal windows inside the workarea has higher priority than gravities, so e.g. trying to position a window at (0,0) with kicker on top is not going to work regardless of the gravity.
Comment 5 Billy Biggs 2004-08-16 16:21:27 UTC
Thanks.