[epiphany] Drop unused libwnck dependency



commit 1480f35cc37a988869783fcb669f791ce69d7dd1
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Mon May 16 14:57:31 2016 -0500

    Drop unused libwnck dependency
    
    Nothing calls ephy_window_is_on_current_workspace anymore. And this
    can't work under Wayland, anyway.

 configure.ac      |    1 -
 src/ephy-shell.c  |   10 ----------
 src/ephy-window.c |   41 -----------------------------------------
 src/ephy-window.h |    2 --
 4 files changed, 0 insertions(+), 54 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 955843c..8a64639 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,7 +101,6 @@ PKG_CHECK_MODULES([DEPENDENCIES], [
                  gtk+-3.0 >= $GTK_REQUIRED
                  gtk+-unix-print-3.0 >= $GTK_REQUIRED
                  x11
-                 libwnck-3.0
                  libxml-2.0 >= $LIBXML_REQUIRED
                  libxslt >= $LIBXSLT_REQUIRED
                  webkit2gtk-4.0 >= $WEBKIT_GTK_REQUIRED
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 4543ca4..8597d45 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -46,9 +46,6 @@
 #include <gdk/gdkx.h>
 #include <gtk/gtk.h>
 
-#define WNCK_I_KNOW_THIS_IS_UNSTABLE
-#include <libwnck/libwnck.h>
-
 struct _EphyShell {
   EphyEmbedShell parent_instance;
 
@@ -139,13 +136,6 @@ ephy_shell_startup_continue (EphyShell *shell, EphyShellStartupContext *ctx)
     ephy_shell_open_uris (shell, (const char **)ctx->arguments,
                           ctx->startup_flags, ctx->user_time);
   }
-
-  /* Get an initial update on our windows and their workspaces,
-   * otherwise our first call to ephy_window_is_on_current_workspace
-   * will be unreliable.
-   */
-  if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
-    wnck_screen_force_update (wnck_screen_get_default ());
 }
 
 static void
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 96ef978..220f0d9 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -61,9 +61,6 @@
 #include <gtk/gtk.h>
 #include <libsoup/soup.h>
 
-#define WNCK_I_KNOW_THIS_IS_UNSTABLE
-#include <libwnck/libwnck.h>
-
 #include <webkit2/webkit2.h>
 
 #ifdef HAVE_X11_XF86KEYSYM_H
@@ -3572,44 +3569,6 @@ ephy_window_get_location_controller (EphyWindow *window)
   return window->location_controller;
 }
 
-/**
- * ephy_window_is_on_current_workspace:
- * @window: an #EphyWindow
- *
- * Returns whether @window is on the current workspace
- *
- * Returns: %TRUE if the window is on the current workspace, %FALSE otherwise
- **/
-gboolean
-ephy_window_is_on_current_workspace (EphyWindow *window)
-{
-  GdkWindow *gdk_window = NULL;
-  WnckWorkspace *workspace = NULL;
-  WnckWindow *wnck_window = NULL;
-
-  if (!gtk_widget_get_realized (GTK_WIDGET (window)))
-    return TRUE;
-
-  gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
-
-  if (!GDK_IS_X11_WINDOW (gdk_window))
-    return TRUE;
-
-  workspace = wnck_screen_get_active_workspace (wnck_screen_get_default ());
-
-  /* From WNCK docs:
-   * "May return NULL sometimes, if libwnck is in a weird state due to
-   *  the asynchronous nature of the interaction with the window manager."
-   * In such a case we cannot really check, so assume we are.
-   */
-  if (!workspace)
-    return TRUE;
-
-  wnck_window = wnck_window_get (GDK_WINDOW_XID (gdk_window));
-
-  return wnck_window_is_on_workspace (wnck_window, workspace);
-}
-
 typedef struct {
   EphyWindow *window;
   GCancellable *cancellable;
diff --git a/src/ephy-window.h b/src/ephy-window.h
index 3d0f335..092e3a2 100644
--- a/src/ephy-window.h
+++ b/src/ephy-window.h
@@ -56,8 +56,6 @@ gboolean          ephy_window_close               (EphyWindow *window);
 
 EphyWindowChrome  ephy_window_get_chrome          (EphyWindow *window);
 
-gboolean      ephy_window_is_on_current_workspace (EphyWindow *window);
-
 G_END_DECLS
 
 #endif


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