From b8cc621c4d941801ec764f04a85f461299f3de0d Mon Sep 17 00:00:00 2001 From: Leonhard <106322251+leolost2605@users.noreply.github.com> Date: Thu, 11 Jul 2024 15:13:07 +0200 Subject: [PATCH] Misc GTK4 prep (#545) --- sample/SampleIndicator.vala | 5 +++-- src/Utils.vala | 2 +- src/Widgets/IndicatorPopover.vala | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sample/SampleIndicator.vala b/sample/SampleIndicator.vala index 9bd042a1..f4dc8152 100644 --- a/sample/SampleIndicator.vala +++ b/sample/SampleIndicator.vala @@ -46,8 +46,9 @@ public class Sample.Indicator : Wingpanel.Indicator { }; /* Create a new composited icon */ - display_widget = new Gtk.Overlay (); - display_widget.add (main_image); + display_widget = new Gtk.Overlay () { + child = main_image + }; display_widget.add_overlay (overlay_image); var separator = new Gtk.Separator (Gtk.Orientation.HORIZONTAL) { diff --git a/src/Utils.vala b/src/Utils.vala index de6805de..27eb9d3b 100644 --- a/src/Utils.vala +++ b/src/Utils.vala @@ -19,6 +19,6 @@ namespace Wingpanel.Utils { public static bool is_wayland () { - return !(Gdk.Display.get_default () is Gdk.X11.Display); + return Gdk.Display.get_default () is Gdk.Wayland.Display; } } diff --git a/src/Widgets/IndicatorPopover.vala b/src/Widgets/IndicatorPopover.vala index 989b7608..20fdb0e7 100644 --- a/src/Widgets/IndicatorPopover.vala +++ b/src/Widgets/IndicatorPopover.vala @@ -33,7 +33,7 @@ public class Wingpanel.Widgets.IndicatorPopover : Gtk.Popover { margin_bottom = 3 }; - add (container); + child = container; } public void set_content (Gtk.Widget? content) {