diff --git a/src/platform/C4AppGTK.cpp b/src/platform/C4AppGTK.cpp index 7daafbd85..48ac2a6e4 100644 --- a/src/platform/C4AppGTK.cpp +++ b/src/platform/C4AppGTK.cpp @@ -141,7 +141,7 @@ bool C4AbstractApp::SetVideoMode(int iXRes, int iYRes, unsigned int iColorDepth, if (Priv->xrandr_major_version >= 0 && !(iXRes == -1 && iYRes == -1)) { // randr spec says to always get fresh info, so don't cache. - XRRScreenConfiguration * conf = XRRGetScreenInfo (dpy, pWindow->wnd); + XRRScreenConfiguration * conf = XRRGetScreenInfo (dpy, pWindow->renderwnd); if (Priv->xrandr_oldmode == -1) Priv->xrandr_oldmode = XRRConfigCurrentConfiguration (conf, &Priv->xrandr_rot); int n; @@ -153,7 +153,7 @@ bool C4AbstractApp::SetVideoMode(int iXRes, int iYRes, unsigned int iColorDepth, #ifdef _DEBUG LogF("XRRSetScreenConfig %d", i); #endif - fDspModeSet = XRRSetScreenConfig(dpy, conf, pWindow->wnd, i, Priv->xrandr_rot, CurrentTime) == RRSetConfigSuccess; + fDspModeSet = XRRSetScreenConfig(dpy, conf, pWindow->renderwnd, i, Priv->xrandr_rot, CurrentTime) == RRSetConfigSuccess; break; } } @@ -169,11 +169,11 @@ void C4AbstractApp::RestoreVideoMode() Display * const dpy = gdk_x11_display_get_xdisplay(gdk_display_get_default()); if (fDspModeSet && Priv->xrandr_major_version >= 0 && Priv->xrandr_oldmode != -1) { - XRRScreenConfiguration * conf = XRRGetScreenInfo (dpy, pWindow->wnd); + XRRScreenConfiguration * conf = XRRGetScreenInfo (dpy, pWindow->renderwnd); #ifdef _DEBUG LogF("XRRSetScreenConfig %d (back)", Priv->xrandr_oldmode); #endif - XRRSetScreenConfig (dpy, conf, pWindow->wnd, Priv->xrandr_oldmode, Priv->xrandr_rot, CurrentTime); + XRRSetScreenConfig (dpy, conf, pWindow->renderwnd, Priv->xrandr_oldmode, Priv->xrandr_rot, CurrentTime); Priv->xrandr_oldmode = -1; XRRFreeScreenConfigInfo(conf); fDspModeSet = false; @@ -225,20 +225,6 @@ bool C4AbstractApp::IsClipboardFull(bool fClipboard) return gtk_clipboard_wait_is_text_available(gtk_clipboard_get(fClipboard ? GDK_SELECTION_CLIPBOARD : GDK_SELECTION_PRIMARY)); } -#if 0 -void C4AbstractApp::OnXInput() -{ - while (XEventsQueued(dpy, QueuedAfterReading)) - { - HandleXMessage(); - } - // At least the _NET_WM_PING reply needs to be flushed, - // and having received events is a good heuristic for - // having issued X11 commands, even if most events - // are mouse moves that don't generate X11 commands. - XFlush(dpy); -} -#endif void C4AbstractApp::MessageDialog(const char * message) { GtkWidget * dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", message); diff --git a/src/platform/C4Window.h b/src/platform/C4Window.h index 0c787b7b8..5669f1277 100644 --- a/src/platform/C4Window.h +++ b/src/platform/C4Window.h @@ -341,7 +341,6 @@ public: protected: bool FindFBConfig(int samples, GLXFBConfig *info); - unsigned long wnd; unsigned long renderwnd; // The GLXFBConfig the window was created with GLXFBConfig Info; diff --git a/src/platform/C4WindowGTK.cpp b/src/platform/C4WindowGTK.cpp index 08aa25d06..e907d6af0 100644 --- a/src/platform/C4WindowGTK.cpp +++ b/src/platform/C4WindowGTK.cpp @@ -533,7 +533,8 @@ static gboolean OnConfigureGD(GtkWidget* widget, GdkEventConfigure* event, gpoin } C4Window::C4Window (): - Active(false), pSurface(0), wnd(0), renderwnd(0), Info(0), window(NULL) + Active(false), pSurface(0), + renderwnd(0), Info(0), window(NULL) { } @@ -768,7 +769,6 @@ C4Window* C4Window::Init(WindowKind windowKind, C4AbstractApp * pApp, const char // Wait until window is mapped to get the window's XID gtk_widget_show_now(GTK_WIDGET(window)); - wnd = GDK_WINDOW_XID(window_wnd); if (GTK_IS_LAYOUT(render_widget)) { @@ -859,7 +859,7 @@ void C4Window::Clear() } // Avoid that the base class tries to free these - wnd = renderwnd = 0; + renderwnd = 0; window = NULL; Active = false;