diff options
author | Laszlo Boros <[email protected]> | 2013-08-02 14:22:42 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-08-11 16:53:33 +0200 |
commit | 9537fb9c0567157ca181c106c9c79756cee541bd (patch) | |
tree | 2aaa7562a71c5405bac3b170f568c3bd5929bb19 /src/terminal-util.c | |
parent | ff67cbbd09a93cd247a0228896a354181f564691 (diff) | |
download | mate-terminal-9537fb9c0567157ca181c106c9c79756cee541bd.tar.bz2 mate-terminal-9537fb9c0567157ca181c106c9c79756cee541bd.tar.xz |
GTK3 support
Diffstat (limited to 'src/terminal-util.c')
-rw-r--r-- | src/terminal-util.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/terminal-util.c b/src/terminal-util.c index 63a4859..0ffb8b8 100644 --- a/src/terminal-util.c +++ b/src/terminal-util.c @@ -44,6 +44,11 @@ #include "terminal-util.h" #include "terminal-window.h" +#if GTK_CHECK_VERSION(3, 0, 0) + #define GDK_WINDOW_XWINDOW GDK_WINDOW_XID + #define GDK_DRAWABLE_XID GDK_WINDOW_XID +#endif + void terminal_util_set_unique_role (GtkWindow *window, const char *prefix) { @@ -1049,7 +1054,11 @@ gboolean terminal_util_x11_get_net_wm_desktop (GdkWindow *window, guint32 *desktop) { + #if GTK_CHECK_VERSION(3, 0, 0) + GdkDisplay *display = gdk_window_get_display (window); + #else GdkDisplay *display = gdk_drawable_get_display (window); + #endif Atom type; int format; guchar *data; @@ -1092,7 +1101,11 @@ terminal_util_x11_set_net_wm_desktop (GdkWindow *window, * http://bugzilla.mate.org/show_bug.cgi?id=586311 asks for GTK+ * to just handle everything behind the scenes including the desktop. */ + #if GTK_CHECK_VERSION(3, 0, 0) + GdkScreen *screen = gdk_window_get_screen (window); + #else GdkScreen *screen = gdk_drawable_get_screen (window); + #endif GdkDisplay *display = gdk_screen_get_display (screen); Display *xdisplay = GDK_DISPLAY_XDISPLAY (display); char *wm_selection_name; @@ -1158,7 +1171,12 @@ terminal_util_x11_set_net_wm_desktop (GdkWindow *window, void terminal_util_x11_clear_demands_attention (GdkWindow *window) { + + #if GTK_CHECK_VERSION(3, 0, 0) + GdkScreen *screen = gdk_window_get_screen (window); + #else GdkScreen *screen = gdk_drawable_get_screen (window); + #endif GdkDisplay *display = gdk_screen_get_display (screen); XClientMessageEvent xclient; @@ -1195,7 +1213,11 @@ terminal_util_x11_clear_demands_attention (GdkWindow *window) gboolean terminal_util_x11_window_is_minimized (GdkWindow *window) { + #if GTK_CHECK_VERSION(3, 0, 0) + GdkDisplay *display = gdk_window_get_display (window); + #else GdkDisplay *display = gdk_drawable_get_display (window); + #endif Atom type; gint format; |