scratchpad: fix moving scratchpad window
From the source: When starting i3 initially (and after each change to the connected outputs), this function fixes the resolution of the __i3 pseudo-output. When that resolution is not set to a function which shares a common divisor with every active output’s resolution, floating point calculation errors will lead to the scratchpad window moving when shown repeatedly. fixes #632
This commit is contained in:
@ -212,6 +212,7 @@ static void handle_motion_notify(xcb_motion_notify_event_t *event) {
|
||||
|
||||
Con *con;
|
||||
if ((con = con_by_frame_id(event->event)) == NULL) {
|
||||
DLOG("MotionNotify for an unknown container, checking if it crosses screen boundaries.\n");
|
||||
check_crossing_screen_boundary(event->root_x, event->root_y);
|
||||
return;
|
||||
}
|
||||
@ -405,6 +406,8 @@ static void handle_screen_change(xcb_generic_event_t *e) {
|
||||
|
||||
randr_query_outputs();
|
||||
|
||||
scratchpad_fix_resolution();
|
||||
|
||||
ipc_send_event("output", I3_IPC_EVENT_OUTPUT, "{\"change\":\"unspecified\"}");
|
||||
|
||||
return;
|
||||
|
Reference in New Issue
Block a user