From 6d0eddf02ad8ead2f9aa42bad8e6dffc8bdd5759 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Mon, 29 Oct 2018 16:02:45 -0500 Subject: [PATCH] GTK+: Don't pass draw signal on OpenGL/Wayland. Also, don't pass draw signal on to GTK+, period. --- gtk/src/gtk_s9xwindow.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gtk/src/gtk_s9xwindow.cpp b/gtk/src/gtk_s9xwindow.cpp index be4c3577..abca60cd 100644 --- a/gtk/src/gtk_s9xwindow.cpp +++ b/gtk/src/gtk_s9xwindow.cpp @@ -150,13 +150,14 @@ event_drawingarea_draw (GtkWidget *widget, cairo_t *cr, gpointer data) { + Snes9xWindow *window = (Snes9xWindow *) data; window->cr = cr; window->cairo_owned = FALSE; window->expose (); window->cr = NULL; - return FALSE; + return TRUE; } #else @@ -168,7 +169,7 @@ event_drawingarea_expose (GtkWidget *widget, { ((Snes9xWindow *) data)->expose (); - return FALSE; + return TRUE; } #endif @@ -781,7 +782,13 @@ Snes9xWindow::expose (void) } #endif - S9xRealDeinitUpdate (last_width, last_height); +#ifdef GDK_WINDOWING_WAYLAND + if (GDK_IS_WAYLAND_WINDOW (gtk_widget_get_window (window))) + { + if (config->hw_accel == HWA_NONE) + S9xRealDeinitUpdate (last_width, last_height); + } +#endif return; }