Skip to content
Snippets Groups Projects
Commit 9b165510 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

On a ConfigureNotify event, only call handle_resize_event() if size changed.

This mirrors commit 0748cc1e about a year ago that optimized window
dragging, and performs basically the same check (removed a week ago
with commit b4ce023c)
parent 00aeb6ec
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4290 passed
...@@ -857,10 +857,17 @@ static int x11_event(XEvent *ev) ...@@ -857,10 +857,17 @@ static int x11_event(XEvent *ev)
break; break;
/* Graphics related events */ /* Graphics related events */
case ConfigureNotify: { case ConfigureNotify: {
bool resize = false;
if (x11_window_xpos != ev->xconfigure.x || x11_window_ypos != ev->xconfigure.y) { if (x11_window_xpos != ev->xconfigure.x || x11_window_ypos != ev->xconfigure.y) {
x11_window_xpos=ev->xconfigure.x; x11_window_xpos=ev->xconfigure.x;
x11_window_ypos=ev->xconfigure.y; x11_window_ypos=ev->xconfigure.y;
} }
pthread_mutex_lock(&vstatlock);
if (ev->xconfigure.width != vstat.winwidth || ev->xconfigure.height != vstat.winheight)
resize = true;
pthread_mutex_unlock(&vstatlock);
if (resize)
handle_resize_event(ev->xconfigure.width, ev->xconfigure.height); handle_resize_event(ev->xconfigure.width, ev->xconfigure.height);
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment