[Xfce4-commits] [apps/xfce4-screenshooter] 02/04: Replace deprecated gdk_flush

noreply at xfce.org noreply at xfce.org
Sat Jan 5 22:27:20 CET 2019


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screenshooter.

commit 30dfa514960951f55d7327640c0173766e0dc61b
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sat Jan 5 17:51:41 2019 -0300

    Replace deprecated gdk_flush
---
 lib/screenshooter-capture.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/lib/screenshooter-capture.c b/lib/screenshooter-capture.c
index e8fccb3..e9b589d 100644
--- a/lib/screenshooter-capture.c
+++ b/lib/screenshooter-capture.c
@@ -927,6 +927,7 @@ static GdkPixbuf
   GdkGrabStatus res;
   GdkSeat   *seat;
   GdkCursor *xhair_cursor;
+  GdkDisplay *display;
 
   /* Initialize the rubber band data */
   rbdata.left_pressed = FALSE;
@@ -967,8 +968,9 @@ static GdkPixbuf
 
   /* This window is not managed by the window manager, we have to set everything
    * ourselves */
+  display = gdk_display_get_default ();
   gtk_widget_realize (window);
-  xhair_cursor = gdk_cursor_new_for_display (gdk_display_get_default (), GDK_CROSSHAIR);
+  xhair_cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
   gdk_window_set_cursor (gtk_widget_get_window (window), xhair_cursor);
   gdk_window_set_override_redirect (gtk_widget_get_window (window), TRUE);
   gtk_widget_set_size_request (window,
@@ -977,7 +979,7 @@ static GdkPixbuf
   gdk_window_raise (gtk_widget_get_window (window));
   gtk_widget_show_now (window);
   gtk_widget_grab_focus (window);
-  gdk_flush ();
+  gdk_display_flush (display);
 
   /* set up the window showing the screenshot size */
   create_size_window (&rbdata);
@@ -988,7 +990,7 @@ static GdkPixbuf
 
   /* Grab the mouse and the keyboard to prevent any interaction with other
    * applications */
-  seat = gdk_display_get_default_seat (gdk_display_get_default ());
+  seat = gdk_display_get_default_seat (display);
   pointer = gdk_seat_get_pointer (seat);
   keyboard = gdk_seat_get_keyboard (seat);
 
@@ -1025,7 +1027,7 @@ static GdkPixbuf
   gtk_dialog_run (GTK_DIALOG (window));
   gtk_widget_destroy (window);
   g_object_unref (xhair_cursor);
-  gdk_flush();
+  gdk_display_flush (display);
 
   if (rbdata.cancelled)
     goto cleanup;
@@ -1041,7 +1043,7 @@ static GdkPixbuf
   /* Ungrab the mouse and the keyboard */
   gdk_device_ungrab (pointer, GDK_CURRENT_TIME);
   gdk_device_ungrab (keyboard, GDK_CURRENT_TIME);
-  gdk_flush ();
+  gdk_display_flush (display);
 
   return screenshot;
 }
@@ -1346,7 +1348,7 @@ static GdkPixbuf
   gdk_window_add_filter (root_window,
                          (GdkFilterFunc) region_filter_func, &rbdata);
 
-  gdk_flush ();
+  gdk_display_flush (gdk_display_get_default ());
 
   gtk_main ();
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list