[epiphany] wrap libwnck code so it runs only on X11
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] wrap libwnck code so it runs only on X11
- Date: Thu, 21 Nov 2013 14:03:32 +0000 (UTC)
commit d10f7619c584241abb9a5280433e1b4740a21c82
Author: Armin K <krejzi email com>
Date: Thu Nov 21 14:14:33 2013 +0100
wrap libwnck code so it runs only on X11
This is necessary to use Epiphany on Weston, the
Wayland compositor without having to run XWayland.
https://bugzilla.gnome.org/show_bug.cgi?id=708955
src/ephy-shell.c | 4 +++-
src/ephy-window.c | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 5fd9d3d..3b2fc3f 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -46,6 +46,7 @@
#include "window-commands.h"
#include <glib/gi18n.h>
+#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#define WNCK_I_KNOW_THIS_IS_UNSTABLE
@@ -139,7 +140,8 @@ ephy_shell_startup_continue (EphyShell *shell)
* otherwise our first call to ephy_window_is_on_current_workspace
* will be unreliable.
*/
- wnck_screen_force_update (wnck_screen_get_default ());
+ 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 da662ab..e67d388 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -4413,6 +4413,11 @@ ephy_window_is_on_current_workspace (EphyWindow *window)
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:
@@ -4423,7 +4428,6 @@ ephy_window_is_on_current_workspace (EphyWindow *window)
if (!workspace)
return TRUE;
- gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
wnck_window = wnck_window_get (GDK_WINDOW_XID (gdk_window));
return wnck_window_is_on_workspace (wnck_window, workspace);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]