summaryrefslogtreecommitdiff
path: root/dix/window.c
diff options
context:
space:
mode:
authorMichal Srb <msrb@suse.com>2018-11-12 13:51:48 +0100
committerAdam Jackson <ajax@redhat.com>2018-11-13 11:02:41 -0500
commitfbdd4d679a7d020f78f7b877033b83e00f5a0f73 (patch)
tree719983a264427233c0eecf82bff5cdf090e1f978 /dix/window.c
parent23752b3ef889ada7b705c51f478f5817e5caaed3 (diff)
dix/window: Use ConfigureWindow instead of MoveWindow
The screensaver can regularly move its window to random offsets. It should use the ConfigureWindow function instead of calling the Screen's MoveWindow directly. Some MoveWindow implementations, such as compMoveWindow, rely on Screen's ConfigNotify being called first as it happens in ConfigureWindow. Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'dix/window.c')
-rw-r--r--dix/window.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/dix/window.c b/dix/window.c
index 2b599e788..f4ace76c7 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -3094,6 +3094,7 @@ int
dixSaveScreens(ClientPtr client, int on, int mode)
{
int rc, i, what, type;
+ XID vlist[2];
if (on == SCREEN_SAVER_FORCER) {
if (mode == ScreenSaverReset)
@@ -3146,14 +3147,11 @@ dixSaveScreens(ClientPtr client, int on, int mode)
* for the root window, so PaintWindow works
*/
screenIsSaved = SCREEN_SAVER_OFF;
- (*pWin->drawable.pScreen->MoveWindow) (pWin,
- (short) (-
- (rand() %
- RANDOM_WIDTH)),
- (short) (-
- (rand() %
- RANDOM_WIDTH)),
- pWin->nextSib, VTMove);
+
+ vlist[0] = -(rand() % RANDOM_WIDTH);
+ vlist[1] = -(rand() % RANDOM_WIDTH);
+ ConfigureWindow(pWin, CWX | CWY, vlist, client);
+
screenIsSaved = SCREEN_SAVER_ON;
}
/*