[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-XBoard] Sticky windows

From: h.g. muller
Subject: Re: [Bug-XBoard] Sticky windows
Date: Mon, 27 Feb 2012 15:48:23 +0100

At 14:12 27-2-2012 +0100, Byrial Jensen wrote:
Den 25-02-2012 22:57, h.g. muller skrev:
I also made a first attempt to implement the -stickyWindows options: the
auxiliary windows Engine Output, Move List, Eval Graph and Game List
will then move together with the main window, if you drag the latter.

I cannot get it to work. Most of time the auxiliary windows don't move when I move the main wondow.

Hmm, that sounds bad. For me (Ubuntu 10.04 gnome) it works like a charm now, but I found X11 to be excessively unreliable in the area of window positioning, so it would not surprise me very much if on other systems there was trouble.

But if I place a window (I tested with the Engine Output window) just to the right of the main window, it will sometimes move downwards together with the main window when I move the main window downwards.

Well, it is only expected to work on windows that touch quite precisely. (WinBoard also implements a 'snap' function as part of this option, which I did not port, as the window manager seems to do this by itself, although not very pronouncedly: when you sowly drag a window, it hesitates a short moment when it exactly touches another window.) To test if windows touch I calculate right edge+1 of the left window, and left edge of the other, and if their difference is below a certain margin I consider them touching. (And the same in all other directions) The margin ('fudge') is currently set to 2 pixes (i.e. 1-pixel gap or overlap is still accepted). The code I use assumes all windows suffer the same dressing by the window manager (frameX, frameY). If not, they misjudge the touching criterion. But that just means they would not move at all. When they move in response to dragging, they should always move as much as the main window, because I add the drag vector to their coordinates.

Only the touching auxiliary windows should follow the main window.

However the Engine Output also goes downwards, when I move the main window upwards!

Well, this sounds like the X-server is not obeying the commands for positioning of the window. I get effects like that when I move the main window so much that the attached windows would be partly off-screen. The window manager apparenly does not lik that, and thinks it suficcient cause to overrule the requested positioning, and put it where it just touches the display edge. (Even though I can move windows partially out of view when I drag them with the mouse.) This then breaks the contact between the windows, so when I move the main window back, the window that was knocked off will stay against the display edge. But I can reconnect that by moving it against the main window again.

I don't know if there are more compelling Xt commands to position a window; currently I simply set the XtNx, XtNy resources of the shell widget of the window.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]