summaryrefslogtreecommitdiff
path: root/mate-screenshot
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2018-09-14 10:33:21 +0200
committerraveit65 <[email protected]>2018-09-23 16:32:48 +0200
commitfec8113ff4b73ebb752704d446d90b3502ba175d (patch)
tree4e490e19506a93e93afe44dc8413f4ee1242ff89 /mate-screenshot
parent8f7ec5e662517247500737617e4aaa5e083e5bc5 (diff)
downloadmate-utils-fec8113ff4b73ebb752704d446d90b3502ba175d.tar.bz2
mate-utils-fec8113ff4b73ebb752704d446d90b3502ba175d.tar.xz
screenshot: replace deprecated gdk_flush
Diffstat (limited to 'mate-screenshot')
-rw-r--r--mate-screenshot/src/screenshot-dialog.c2
-rw-r--r--mate-screenshot/src/screenshot-utils.c12
2 files changed, 10 insertions, 4 deletions
diff --git a/mate-screenshot/src/screenshot-dialog.c b/mate-screenshot/src/screenshot-dialog.c
index 3e120061..db7a0f67 100644
--- a/mate-screenshot/src/screenshot-dialog.c
+++ b/mate-screenshot/src/screenshot-dialog.c
@@ -372,5 +372,5 @@ screenshot_dialog_set_busy (ScreenshotDialog *dialog,
gtk_widget_set_sensitive (toplevel, ! busy);
- gdk_flush ();
+ gdk_display_flush (display);
}
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;