mirror of
https://github.com/gryf/wmaker.git
synced 2026-04-01 20:43:36 +02:00
wmaker: fix client repositioning on frame moves
This patch is preventing X server gravity adjustments from offsetting the client windows esp when the gravity is non standard as seen in openoffice with xprop: 'window gravity: Static'. Also fixing _NET_WM_STATE property query request as in X11 it can contain multiple atoms simultaneously, acting as an array.
This commit is contained in:
committed by
Carlos R. Mafra
parent
1f03c13f4d
commit
ac1fa7fc6d
@@ -2219,6 +2219,14 @@ void wWindowConfigure(WWindow *wwin, int req_x, int req_y, int req_width, int re
|
|||||||
wFrameWindowConfigure(wwin->frame, req_x, req_y, req_width, h);
|
wFrameWindowConfigure(wwin->frame, req_x, req_y, req_width, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When the frame is resized/moved, the X server repositions a client
|
||||||
|
* with non-NorthWest gravity inside the frame to compensate (visible as
|
||||||
|
* a GravityNotify with xev), leaving it at the wrong offset.
|
||||||
|
*/
|
||||||
|
if (wwin->normal_hints->win_gravity != NorthWestGravity)
|
||||||
|
XMoveWindow(dpy, wwin->client_win, 0, wwin->frame->top_width);
|
||||||
|
|
||||||
if (!(req_height > wwin->frame->core->height || req_width > wwin->frame->core->width))
|
if (!(req_height > wwin->frame->core->height || req_width > wwin->frame->core->width))
|
||||||
XResizeWindow(dpy, wwin->client_win, req_width, req_height);
|
XResizeWindow(dpy, wwin->client_win, req_width, req_height);
|
||||||
|
|
||||||
|
|||||||
@@ -1524,7 +1524,7 @@ void wNETWMCheckClientHints(WWindow *wwin, int *layer, int *workspace)
|
|||||||
*workspace = desktop;
|
*workspace = desktop;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (XGetWindowProperty(dpy, wwin->client_win, net_wm_state, 0, 1, False,
|
if (XGetWindowProperty(dpy, wwin->client_win, net_wm_state, 0, 1024L, False,
|
||||||
XA_ATOM, &type_ret, &fmt_ret, &nitems_ret,
|
XA_ATOM, &type_ret, &fmt_ret, &nitems_ret,
|
||||||
&bytes_after_ret, (unsigned char **)&data) == Success && data) {
|
&bytes_after_ret, (unsigned char **)&data) == Success && data) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user