summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2015-09-16 13:49:07 +0200
committerinfirit <[email protected]>2015-09-16 13:54:53 +0200
commite12e55167107adaa0b45decdb2f57cf7c870d2aa (patch)
treeb634297334c5b708a8e7ef4f66490e130da19280
parent59c218b6067263cb1667656a85a15483a01e8c5a (diff)
downloadmarco-e12e55167107adaa0b45decdb2f57cf7c870d2aa.tar.bz2
marco-e12e55167107adaa0b45decdb2f57cf7c870d2aa.tar.xz
tile-preview: Small cleanup
* GDK_DISPLAY_XDISPLAY and gdk_display_get_default are in Gtk2 * Get window from GdkEvent
-rw-r--r--src/ui/tile-preview.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/ui/tile-preview.c b/src/ui/tile-preview.c
index c938317b..6682de69 100644
--- a/src/ui/tile-preview.c
+++ b/src/ui/tile-preview.c
@@ -62,11 +62,7 @@ meta_tile_preview_expose (GtkWidget *widget,
{
MetaTilePreview *preview = user_data;
#if !GTK_CHECK_VERSION (3, 0, 0)
- GdkWindow *window;
- cairo_t *cr;
-
- window = gtk_widget_get_window (widget);
- cr = gdk_cairo_create (window);
+ cairo_t *cr = gdk_cairo_create (event->window);
#endif
cairo_set_line_width (cr, 1.0);
@@ -265,11 +261,7 @@ meta_tile_preview_show (MetaTilePreview *preview,
return; /* nothing to do */
window = gtk_widget_get_window (preview->preview_window);
-#if GTK_CHECK_VERSION (3, 0, 0)
meta_core_lower_beneath_focus_window (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
-#else
- meta_core_lower_beneath_focus_window (gdk_display,
-#endif
GDK_WINDOW_XID (window),
gtk_get_current_event_time ());