mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Fix ICCM ConfigureNotify request
According to ICCM specs at [1] *Not changing the size, location, border width, or stacking order of the window at all. A client will receive a synthetic ConfigureNotify event that describes the (unchanged) geometry of the window. The (x,y) coordinates will be in the root coordinate system, adjusted for the border width the client requested, irrespective of any reparenting that has taken place. The border_width will be the border width the client requested. The client will not receive a real ConfigureNotify event because no change has actually taken place. *Moving or restacking the window without resizing it or changing its border width. A client will receive a synthetic ConfigureNotify event following the change that describes the new geometry of the window. The event's (x,y) coordinates will be in the root coordinate system adjusted for the border width the client requested. The border_width will be the border width the client requested. The client may not receive a real ConfigureNotify event that describes this change because the window manager may have reparented the top-level window. If the client does receive a real event, the synthetic event will follow the real one. *Resizing the window or changing its border width (regardless of whether the window was also moved or restacked). A client that has selected for StructureNotify events will receive a real ConfigureNotify event. Note that the coordinates in this event are relative to the parent, which may not be the root if the window has been reparented. The coordinates will reflect the actual border width of the window (which the window manager may have changed). The TranslateCoordinates request can be used to convert the coordinates if required. In Window Maker, the first case is not implemented: doing a synthetic ConfigureNotify to notify no changes were done. That's creating some issues with app like Citrix icaclient when sometime windows are blank and need to be moved to be refreshed. [1]https://x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html#configuring_the_window
This commit is contained in:
committed by
Carlos R. Mafra
parent
25cb9d208a
commit
eae9200c5d
15
src/window.c
15
src/window.c
@@ -2150,12 +2150,6 @@ void wWindowConfigure(WWindow *wwin, int req_x, int req_y, int req_width, int re
|
|||||||
int resize;
|
int resize;
|
||||||
|
|
||||||
resize = (req_width != wwin->client.width || req_height != wwin->client.height);
|
resize = (req_width != wwin->client.width || req_height != wwin->client.height);
|
||||||
/*
|
|
||||||
* if the window is being moved but not resized then
|
|
||||||
* send a synthetic ConfigureNotify
|
|
||||||
*/
|
|
||||||
if ((req_x != wwin->frame_x || req_y != wwin->frame_y) && !resize)
|
|
||||||
synth_notify = True;
|
|
||||||
|
|
||||||
if (WFLAGP(wwin, dont_move_off))
|
if (WFLAGP(wwin, dont_move_off))
|
||||||
wScreenBringInside(wwin->screen_ptr, &req_x, &req_y, req_width, req_height);
|
wScreenBringInside(wwin->screen_ptr, &req_x, &req_y, req_width, req_height);
|
||||||
@@ -2192,11 +2186,18 @@ void wWindowConfigure(WWindow *wwin, int req_x, int req_y, int req_width, int re
|
|||||||
wwin->client.width = req_width;
|
wwin->client.width = req_width;
|
||||||
wwin->client.height = req_height;
|
wwin->client.height = req_height;
|
||||||
} else {
|
} else {
|
||||||
|
if (req_x != wwin->frame_x || req_y != wwin->frame_y) {
|
||||||
wwin->client.x = req_x;
|
wwin->client.x = req_x;
|
||||||
wwin->client.y = req_y + wwin->frame->top_width;
|
wwin->client.y = req_y + wwin->frame->top_width;
|
||||||
|
|
||||||
XMoveWindow(dpy, wwin->frame->core->window, req_x, req_y);
|
XMoveWindow(dpy, wwin->frame->core->window, req_x, req_y);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* if the window is being moved but not resized
|
||||||
|
* or if we change nothing then
|
||||||
|
* send a synthetic ConfigureNotify
|
||||||
|
*/
|
||||||
|
synth_notify = True;
|
||||||
|
}
|
||||||
wwin->frame_x = req_x;
|
wwin->frame_x = req_x;
|
||||||
wwin->frame_y = req_y;
|
wwin->frame_y = req_y;
|
||||||
if (HAS_BORDER(wwin)) {
|
if (HAS_BORDER(wwin)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user