[gnome-applets] window-buttons: port to WnckHandle
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] window-buttons: port to WnckHandle
- Date: Sun, 2 Oct 2022 14:30:48 +0000 (UTC)
commit fddefa81b027bd9e4c98c321397032d5c581150b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Oct 2 14:44:39 2022 +0300
window-buttons: port to WnckHandle
gnome-applets/window-buttons/window-buttons-private.h | 1 +
gnome-applets/window-buttons/window-buttons.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gnome-applets/window-buttons/window-buttons-private.h
b/gnome-applets/window-buttons/window-buttons-private.h
index e8ccc192e..780598376 100644
--- a/gnome-applets/window-buttons/window-buttons-private.h
+++ b/gnome-applets/window-buttons/window-buttons-private.h
@@ -152,6 +152,7 @@ struct _WBApplet
/* Variables */
WBPreferences *prefs; // Main preferences
WindowButton **button; // Array of buttons
+ WnckHandle *handle;
WnckScreen *activescreen; // Active screen
gulong active_window_changed_id;
diff --git a/gnome-applets/window-buttons/window-buttons.c b/gnome-applets/window-buttons/window-buttons.c
index d7915a55e..541c63e7b 100644
--- a/gnome-applets/window-buttons/window-buttons.c
+++ b/gnome-applets/window-buttons/window-buttons.c
@@ -113,6 +113,8 @@ wb_applet_dispose (GObject *object)
}
}
+ g_clear_object (&self->handle);
+
G_OBJECT_CLASS (wb_applet_parent_class)->dispose (object);
}
@@ -666,7 +668,8 @@ init_wbapplet (WBApplet *wbapplet)
wbapplet->settings = gp_applet_settings_new (GP_APPLET (wbapplet), WINDOWBUTTONS_GSCHEMA);
wbapplet->prefs = loadPreferences(wbapplet);
- wbapplet->activescreen = wnck_screen_get_default();
+ wbapplet->handle = wnck_handle_new (WNCK_CLIENT_TYPE_PAGER);
+ wbapplet->activescreen = wnck_handle_get_default_screen (wbapplet->handle);
wnck_screen_force_update(wbapplet->activescreen);
wbapplet->activeworkspace = wnck_screen_get_active_workspace(wbapplet->activescreen);
wbapplet->activewindow = wnck_screen_get_active_window(wbapplet->activescreen);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]