Skip to content

Commit b03219c

Browse files
change swap and event processing order to avoid resize glitches
1 parent dc4219f commit b03219c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/pango_windowing/src/display_wayland.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,17 +1025,17 @@ void WaylandWindow::Move(const int /*x*/, const int /*y*/) { }
10251025

10261026
void WaylandWindow::Resize(const unsigned int /*w*/, const unsigned int /*h*/) { }
10271027

1028-
void WaylandWindow::ProcessEvents() { }
1028+
void WaylandWindow::ProcessEvents() {
1029+
wl_display_dispatch_pending(display->wdisplay);
1030+
}
10291031

10301032
void WaylandWindow::SwapBuffers() {
1031-
eglSwapBuffers(display->egl_display, egl_surface);
1032-
10331033
// draw all decoration elements
10341034
decoration->draw();
10351035

10361036
MakeCurrent();
10371037

1038-
wl_display_dispatch(display->wdisplay);
1038+
eglSwapBuffers(display->egl_display, egl_surface);
10391039
}
10401040

10411041

0 commit comments

Comments
 (0)