summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@igalia.com>2016-05-16 14:57:31 -0500
committerMichael Catanzaro <mcatanzaro@igalia.com>2016-05-16 15:09:40 -0500
commit1480f35cc37a988869783fcb669f791ce69d7dd1 (patch)
tree4ca4d5548498ec34cfa9c9b6fc0d55cfcafc1dfa
parentcd66493455cfbbb585cc051eb38cbfd640751014 (diff)
downloadepiphany-1480f35cc37a988869783fcb669f791ce69d7dd1.tar.gz
Drop unused libwnck dependency
Nothing calls ephy_window_is_on_current_workspace anymore. And this can't work under Wayland, anyway.
-rw-r--r--configure.ac1
-rw-r--r--src/ephy-shell.c10
-rw-r--r--src/ephy-window.c41
-rw-r--r--src/ephy-window.h2
4 files changed, 0 insertions, 54 deletions
diff --git a/configure.ac b/configure.ac
index 955843c63..8a64639d7 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 4543ca4ff..8597d4517 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 96ef978e8..220f0d9d7 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 3d0f335b2..092e3a2d9 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