summaryrefslogtreecommitdiff
path: root/mate-screenshot/src
diff options
context:
space:
mode:
Diffstat (limited to 'mate-screenshot/src')
-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;