[libwnck/wip/muktupavels/use-wnck-handle] window: use WnckHandle to get window



commit 27e3a6ae88fc30c53e5802cfec05b3a4dc5d5bdf
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Feb 24 14:06:20 2022 +0200

    window: use WnckHandle to get window

 libwnck/window.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/libwnck/window.c b/libwnck/window.c
index 581f60fc..5e206756 100644
--- a/libwnck/window.c
+++ b/libwnck/window.c
@@ -558,13 +558,13 @@ _wnck_window_destroy (WnckWindow *window)
 
   handle = _wnck_screen_get_handle (window->priv->screen);
 
-  g_return_if_fail (wnck_window_get (xwindow) == window);
+  g_return_if_fail (_wnck_handle_get_window (handle, xwindow) == window);
 
   _wnck_handle_remove_window (handle, &xwindow);
 
   /* Removing from handle also removes the only ref WnckWindow had */
 
-  g_return_if_fail (wnck_window_get (xwindow) == NULL);
+  g_return_if_fail (_wnck_handle_get_window (handle, xwindow) == NULL);
 }
 
 static Display *
@@ -740,9 +740,13 @@ wnck_window_get_application  (WnckWindow *window)
 WnckWindow*
 wnck_window_get_transient (WnckWindow *window)
 {
+  WnckHandle *handle;
+
   g_return_val_if_fail (WNCK_IS_WINDOW (window), NULL);
 
-  return wnck_window_get (window->priv->transient_for);
+  handle = _wnck_screen_get_handle (window->priv->screen);
+
+  return _wnck_handle_get_window (handle, window->priv->transient_for);
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]