diff options
author | raveit65 <[email protected]> | 2018-09-14 10:33:21 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-09-23 16:32:48 +0200 |
commit | fec8113ff4b73ebb752704d446d90b3502ba175d (patch) | |
tree | 4e490e19506a93e93afe44dc8413f4ee1242ff89 /mate-screenshot/src/screenshot-utils.c | |
parent | 8f7ec5e662517247500737617e4aaa5e083e5bc5 (diff) | |
download | mate-utils-fec8113ff4b73ebb752704d446d90b3502ba175d.tar.bz2 mate-utils-fec8113ff4b73ebb752704d446d90b3502ba175d.tar.xz |
screenshot: replace deprecated gdk_flush
Diffstat (limited to 'mate-screenshot/src/screenshot-utils.c')
-rw-r--r-- | mate-screenshot/src/screenshot-utils.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/mate-screenshot/src/screenshot-utils.c b/mate-screenshot/src/screenshot-utils.c index d565fffe..03c9bcac 100644 --- a/mate-screenshot/src/screenshot-utils.c +++ b/mate-screenshot/src/screenshot-utils.c @@ -45,6 +45,7 @@ screenshot_grab_lock (void) { GdkAtom selection_atom; gboolean result = FALSE; + GdkDisplay *display; selection_atom = gdk_atom_intern (SELECTION_NAME, FALSE); gdk_x11_grab_server (); @@ -68,7 +69,9 @@ screenshot_grab_lock (void) out: gdk_x11_ungrab_server (); - gdk_flush (); + + display = gdk_display_get_default (); + gdk_display_flush (display); return result; } @@ -76,13 +79,16 @@ screenshot_grab_lock (void) void screenshot_release_lock (void) { + GdkDisplay *display; + if (selection_window) { gtk_widget_destroy (selection_window); selection_window = NULL; } - gdk_flush (); + display = gdk_display_get_default (); + gdk_display_flush (display); } static GdkWindow * @@ -427,7 +433,7 @@ screenshot_select_area_async (SelectAreaCallback callback) gtk_widget_destroy (data.window); g_object_unref (cursor); - gdk_flush (); + gdk_display_flush (display); out: cb_data->rectangle = data.rect; |