Skip to content

Commit

Permalink
replace deprecated gdk_flush
Browse files Browse the repository at this point in the history
  • Loading branch information
raveit65 authored and lukefromdc committed May 7, 2018
1 parent 5ed053f commit 2392093
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/caja-application.c
Expand Up @@ -816,9 +816,9 @@ caja_application_create_desktop_windows (CajaApplication *application)

/* We realize it immediately so that the CAJA_DESKTOP_WINDOW_ID
property is set so mate-settings-daemon doesn't try to set the
background. And we do a gdk_flush() to be sure X gets it. */
background. And we do a gdk_display_flush() to be sure X gets it. */
gtk_widget_realize (GTK_WIDGET (window));
gdk_flush ();
gdk_display_flush (display);

caja_application_desktop_windows =
g_list_prepend (caja_application_desktop_windows, window);
Expand Down
4 changes: 3 additions & 1 deletion src/file-manager/fm-desktop-icon-view.c
Expand Up @@ -321,6 +321,7 @@ fm_desktop_icon_view_handle_middle_click (CajaIconContainer *icon_container,
XButtonEvent x_event;
GdkDevice *keyboard = NULL, *pointer = NULL, *cur;
GdkSeat *seat;
GdkDisplay *display;

seat = gdk_display_get_default_seat (gtk_widget_get_display (GTK_WIDGET (icon_container)));
pointer = gdk_seat_get_pointer (seat);
Expand Down Expand Up @@ -350,7 +351,8 @@ fm_desktop_icon_view_handle_middle_click (CajaIconContainer *icon_container,
}

/* Stop the event because we don't want anyone else dealing with it. */
gdk_flush ();
display = gtk_widget_get_display (GTK_WIDGET (icon_container));
gdk_display_flush (display);
g_signal_stop_emission_by_name (icon_container, "middle_click");

/* build an X event to represent the middle click. */
Expand Down

0 comments on commit 2392093

Please sign in to comment.