Commit 0aac21c5 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

avoid deprecated gdk_flush

parent ab9e1571
Pipeline #30453 failed with stage
in 2 minutes and 29 seconds
......@@ -194,15 +194,18 @@ kill_window_response (GtkDialog *dialog,
gpointer user_data)
{
if (response_id == GTK_RESPONSE_ACCEPT) {
Display *display;
GdkDisplay *display;
Display *xdisplay;
Window window = (Window) user_data;
display = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (dialog)));
display = gtk_widget_get_display (GTK_WIDGET (dialog));
xdisplay = gdk_x11_display_get_xdisplay (display);
gdk_error_trap_push ();
XKillClient (display, window);
gdk_flush ();
gdk_error_trap_pop_ignored ();
gdk_x11_display_error_trap_push (display);
XKillClient (xdisplay, window);
gdk_x11_display_error_trap_pop_ignored (display);
gdk_display_flush (display);
}
gtk_widget_destroy (GTK_WIDGET (dialog));
......@@ -356,5 +359,5 @@ panel_force_quit (GdkScreen *screen,
return;
}
gdk_flush ();
gdk_display_flush (display);
}
......@@ -104,11 +104,15 @@ panel_push_window_busy (GtkWidget *window)
win = gtk_widget_get_window (window);
if (win != NULL) {
GdkCursor *cursor = gdk_cursor_new_for_display (gdk_display_get_default (),
GDK_WATCH);
GdkDisplay *display;
GdkCursor *cursor;
display = gdk_display_get_default ();
cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
gdk_window_set_cursor (win, cursor);
g_object_unref (cursor);
gdk_flush ();
gdk_display_flush (display);
}
}
......
......@@ -1691,21 +1691,19 @@ panel_widget_applet_drag_start (PanelWidget *panel,
window = gtk_widget_get_window (applet);
if (window) {
GdkGrabStatus status;
GdkCursor *fleur_cursor;
GdkDisplay *display;
GdkCursor *fleur_cursor;
GdkSeat *seat;
fleur_cursor = gdk_cursor_new_for_display (gdk_display_get_default (),
GDK_FLEUR);
display = gdk_window_get_display (window);
display = gdk_display_get_default ();
fleur_cursor = gdk_cursor_new_for_display (display, GDK_FLEUR);
seat = gdk_display_get_default_seat (display);
status = gdk_seat_grab (seat, window, GDK_SEAT_CAPABILITY_POINTER,
FALSE, fleur_cursor, NULL, NULL, NULL);
g_object_unref (fleur_cursor);
gdk_flush ();
gdk_display_flush (display);
if (status != GDK_GRAB_SUCCESS) {
g_warning (G_STRLOC ": failed to grab pointer (errorcode: %d)",
......@@ -1733,7 +1731,7 @@ panel_widget_applet_drag_end (PanelWidget *panel)
gtk_grab_remove (panel->currently_dragged_applet->applet);
panel_widget_applet_drag_end_no_grab (panel);
panel_toplevel_pop_autohide_disabler (panel->toplevel);
gdk_flush ();
gdk_display_flush (display);
}
/*get pos of the cursor location in panel coordinates*/
......@@ -2314,6 +2312,7 @@ panel_widget_reparent (PanelWidget *old_panel,
AppletData *ad;
GtkWidget *focus_widget = NULL;
AppletInfo* info;
GdkDisplay *display;
g_return_val_if_fail(PANEL_IS_WIDGET(old_panel), FALSE);
g_return_val_if_fail(PANEL_IS_WIDGET(new_panel), FALSE);
......@@ -2364,7 +2363,8 @@ panel_widget_reparent (PanelWidget *old_panel,
}
gtk_window_present (GTK_WINDOW (new_panel->toplevel));
gdk_flush();
display = gdk_display_get_default ();
gdk_display_flush (display);
emit_applet_moved (new_panel, ad);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment