From a1f8cf380767d386c5481a9177afe895da95f099 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Fri, 4 May 2018 18:31:25 -0500 Subject: [PATCH] Bypass compositor properly. --- gtk/src/gtk_s9xwindow.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gtk/src/gtk_s9xwindow.cpp b/gtk/src/gtk_s9xwindow.cpp index b553edc4..11630214 100644 --- a/gtk/src/gtk_s9xwindow.cpp +++ b/gtk/src/gtk_s9xwindow.cpp @@ -1597,8 +1597,9 @@ Snes9xWindow::get_auto_input_rate (void) static void set_bypass_compositor (Display *dpy, Window window, unsigned char bypass) { + uint32 value = bypass; Atom net_wm_bypass_compositor = XInternAtom (dpy, "_NET_WM_BYPASS_COMPOSITOR", False); - XChangeProperty (dpy, window, net_wm_bypass_compositor, XA_CARDINAL, 32, PropModeReplace, (const unsigned char *) &bypass, 1); + XChangeProperty (dpy, window, net_wm_bypass_compositor, XA_CARDINAL, 32, PropModeReplace, (const unsigned char *) &value, 1); } void @@ -1650,8 +1651,8 @@ Snes9xWindow::enter_fullscreen_mode (void) gdk_display_sync (gdk_display_get_default ()); gtk_window_present (GTK_WINDOW (window)); - set_bypass_compositor (gdk_x11_display_get_xdisplay (gtk_widget_get_display (GTK_WIDGET (drawing_area))), - gdk_x11_window_get_xid (gtk_widget_get_window (GTK_WIDGET (drawing_area))), + set_bypass_compositor (gdk_x11_display_get_xdisplay (gtk_widget_get_display (GTK_WIDGET (window))), + gdk_x11_window_get_xid (gtk_widget_get_window (GTK_WIDGET (window))), 1); config->fullscreen = 1; @@ -1705,8 +1706,8 @@ Snes9xWindow::leave_fullscreen_mode (void) gtk_window_unfullscreen (GTK_WINDOW (window)); - set_bypass_compositor (gdk_x11_display_get_xdisplay (gtk_widget_get_display (GTK_WIDGET (drawing_area))), - gdk_x11_window_get_xid (gtk_widget_get_window (GTK_WIDGET (drawing_area))), + set_bypass_compositor (gdk_x11_display_get_xdisplay (gtk_widget_get_display (GTK_WIDGET (window))), + gdk_x11_window_get_xid (gtk_widget_get_window (GTK_WIDGET (window))), 0); resize (nfs_width, nfs_height);