Branch: refs/heads/gtk3-support Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 08 Oct 2012 18:08:07 UTC Commit: 3ae884c13f0eddd5a8533fefddda8a566196ad24 https://github.com/geany/geany/commit/3ae884c13f0eddd5a8533fefddda8a566196ad...
Log Message: ----------- Make X11 backend specific code GTK3-proof
Modified Paths: -------------- src/socket.c
Modified: src/socket.c 10 files changed, 8 insertions(+), 2 deletions(-) =================================================================== @@ -663,12 +663,18 @@ gboolean socket_lock_input_cb(GIOChannel *source, GIOCondition condition, gpoint if (popup) { #ifdef GDK_WINDOWING_X11 + GdkWindow *x11_window = gtk_widget_get_window(window); + /* Set the proper interaction time on the window. This seems necessary to make * gtk_window_present() really bring the main window into the foreground on some * window managers like Gnome's metacity. * Code taken from Gedit. */ - gdk_x11_window_set_user_time(gtk_widget_get_window(window), - gdk_x11_get_server_time(gtk_widget_get_window(window))); +# if GTK_CHECK_VERSION(3, 0, 0) + if (GDK_IS_X11_WINDOW(x11_window)) +# endif + { + gdk_x11_window_set_user_time(x11_window, gdk_x11_get_server_time(x11_window)); + } #endif gtk_window_present(GTK_WINDOW(window)); #ifdef G_OS_WIN32
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).