diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-09-10 15:23:54 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2019-09-20 15:22:37 +0200 |
commit | 5ed9c861b94953041fb9e505e03e25c148ce2ec5 (patch) | |
tree | 8e015be402e71cf5fe92524a37bef0865ed3cc8c | |
parent | 94518cf90edd05c550202ed0dc583e0fd211fdea (diff) | |
download | network-manager-applet-5ed9c861b94953041fb9e505e03e25c148ce2ec5.tar.gz |
nma/mobile-wizard: deal with the taskbar-hint in GTK4
-rw-r--r-- | src/libnma/nma-mobile-wizard.c | 17 | ||||
-rw-r--r-- | src/libnma/nma-mobile-wizard.ui | 1 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/libnma/nma-mobile-wizard.c b/src/libnma/nma-mobile-wizard.c index 44a59ce6..9a4e753b 100644 --- a/src/libnma/nma-mobile-wizard.c +++ b/src/libnma/nma-mobile-wizard.c @@ -12,6 +12,12 @@ #include <stdlib.h> +#if GTK_CHECK_VERSION(3,90,0) +#include <gdk/x11/gdkx.h> +#else +#include <gdk/gdkx.h> +#endif + #include <NetworkManager.h> #include <nm-setting-gsm.h> #include <nm-setting-cdma.h> @@ -1451,6 +1457,17 @@ static void nma_mobile_wizard_init (NMAMobileWizard *self) { gtk_widget_init_template (GTK_WIDGET (self)); + gtk_widget_realize (GTK_WIDGET (self)); + + if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (GTK_WIDGET (self)))) { +#if GTK_CHECK_VERSION(3,90,0) + GdkSurface *surface = gtk_widget_get_surface (GTK_WIDGET (self)); + gdk_x11_surface_set_skip_taskbar_hint (surface, TRUE); +#else + GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (self)); + gdk_window_set_skip_taskbar_hint (gdk_window, TRUE); +#endif + } } /** diff --git a/src/libnma/nma-mobile-wizard.ui b/src/libnma/nma-mobile-wizard.ui index 4c64f3c1..9138a9e0 100644 --- a/src/libnma/nma-mobile-wizard.ui +++ b/src/libnma/nma-mobile-wizard.ui @@ -50,7 +50,6 @@ <property name="modal">True</property> <property name="window_position">center-always</property> <property name="type_hint">dialog</property> - <property name="skip_taskbar_hint">True</property> <property name="use_header_bar">1</property> <signal name="cancel" handler="assistant_cancel" swapped="no"/> <signal name="close" handler="assistant_closed" swapped="no"/> |