summaryrefslogtreecommitdiff
path: root/src/ui/frames.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2025-07-27 16:07:59 -0400
committerGitHub <[email protected]>2025-07-27 20:07:59 +0000
commit87aa5feb8790168eb7b2bc890938353116d26594 (patch)
tree69080ca256e1d85570f74b3dc945e801e398780b /src/ui/frames.c
parent797b4dc01895b9936c68aad9f8b4e8b7b24502ab (diff)
downloadmarco-87aa5feb8790168eb7b2bc890938353116d26594.tar.bz2
marco-87aa5feb8790168eb7b2bc890938353116d26594.tar.xz
Fix GTK deprecations (#798)
* menu: replace gtk_menu_popup() with gtk_menu_popup_at_rect() Replace deprecated gtk_menu_popup() with gtk_menu_popup_at_rect(). This provides the same menu positioning calculation while eliminating deprecation warnings. * ui: replace gtk_widget_get_realized() with gtk_widget_get_mapped() Replace deprecated gtk_widget_get_realized() with gtk_widget_get_mapped(). Since mapped widgets are guaranteed to be realized, and we only care about widget visibility, this change eliminates deprecation warnings while maintaining the same functionality. * frames: replace gdk_window_process_all_updates() with gdk_display_flush() Replace deprecated gdk_window_process_all_updates() with gdk_display_flush(). Both functions ensure pending updates are processed, but gdk_display_flush is more general for all display requests.
Diffstat (limited to 'src/ui/frames.c')
-rw-r--r--src/ui/frames.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c
index ad7e10c8..19c14c56 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -504,7 +504,7 @@ meta_frames_ensure_layout (MetaFrames *frames,
MetaFrameType type;
MetaFrameStyle *style;
- g_return_if_fail (gtk_widget_get_realized (GTK_WIDGET (frames)));
+ g_return_if_fail (gtk_widget_get_mapped (GTK_WIDGET (frames)));
widget = GTK_WIDGET (frames);
@@ -1310,7 +1310,7 @@ meta_frames_repaint_frame (MetaFrames *frames,
/* repaint everything, so the other frame don't
* lag behind if they are exposed
*/
- gdk_window_process_all_updates ();
+ gdk_display_flush (gdk_display_get_default ());
}
static void
@@ -2970,8 +2970,7 @@ meta_frames_push_delay_exposes (MetaFrames *frames)
if (frames->expose_delay_count == 0)
{
/* Make sure we've repainted things */
- gdk_window_process_all_updates ();
- XFlush (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
+ gdk_display_flush (gdk_display_get_default ());
}
frames->expose_delay_count += 1;