Skip to content
Permalink
Browse files

libview: replace deprecated gdk_flush

  • Loading branch information...
raveit65 committed May 4, 2018
1 parent 135e208 commit 3168191efb8b4407012ef26ecd338b0d88bec9b1
Showing with 8 additions and 4 deletions.
  1. +4 −2 libview/ev-view-presentation.c
  2. +4 −2 libview/ev-view.c
@@ -904,6 +904,7 @@ ev_view_presentation_set_cursor (EvViewPresentation *pview,
EvViewCursor view_cursor)
{
GtkWidget *widget;
GdkDisplay *display;
GdkCursor *cursor;

if (pview->cursor == view_cursor)
@@ -915,9 +916,10 @@ ev_view_presentation_set_cursor (EvViewPresentation *pview,

pview->cursor = view_cursor;

cursor = ev_view_cursor_new (gtk_widget_get_display (widget), view_cursor);
display = gtk_widget_get_display (widget);
cursor = ev_view_cursor_new (display, view_cursor);
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
gdk_flush ();
gdk_display_flush (display);
if (cursor)
g_object_unref (cursor);
}
@@ -8047,6 +8047,7 @@ ev_view_copy_link_address (EvView *view,
static void
ev_view_set_cursor (EvView *view, EvViewCursor new_cursor)
{
GdkDisplay *display;
GdkCursor *cursor = NULL;
GtkWidget *widget;
GdkWindow *bin_window;
@@ -8059,9 +8060,10 @@ ev_view_set_cursor (EvView *view, EvViewCursor new_cursor)

bin_window = gtk_widget_get_window (GTK_WIDGET (view));
widget = gtk_widget_get_toplevel (GTK_WIDGET (view));
cursor = ev_view_cursor_new (gtk_widget_get_display (widget), new_cursor);
display = gtk_widget_get_display (widget);
cursor = ev_view_cursor_new (display, new_cursor);
gdk_window_set_cursor (bin_window, cursor);
gdk_flush ();
gdk_display_flush (display);
if (cursor)
g_object_unref (cursor);
}

0 comments on commit 3168191

Please sign in to comment.
You can’t perform that action at this time.