mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Prevent border drifting.
Windows were drifting by FRAME_BORDER_WIDTH pixels when their borders were toggled on or off. Windows which had a border before we managed them were drifting on shutdown and again at startup. It happened because the absolute upper-left co-ordinates of a bordered window would in fact be the upper-left co-ordinates of the border itself, whereas we consider the client window to have no border and co-ordinates offset by the titlebar and frame border.
This commit is contained in:
committed by
Carlos R. Mafra
parent
4e193c172b
commit
df601267e6
@@ -83,6 +83,8 @@ void wClientRestore(WWindow * wwin)
|
||||
#endif
|
||||
/* account for titlebar and border */
|
||||
wwin->frame_y += wwin->frame->top_width;
|
||||
wwin->frame_x -= wwin->old_border_width;
|
||||
wwin->frame_y -= wwin->old_border_width;
|
||||
if (HAS_BORDER(wwin)) {
|
||||
wwin->frame_x += FRAME_BORDER_WIDTH;
|
||||
wwin->frame_y += FRAME_BORDER_WIDTH;
|
||||
|
||||
Reference in New Issue
Block a user