gedit r6120 - in trunk: . gedit
- From: pborelli svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6120 - in trunk: . gedit
- Date: Thu, 24 Jan 2008 22:36:40 +0000 (GMT)
Author: pborelli
Date: Thu Jan 24 22:36:40 2008
New Revision: 6120
URL: http://svn.gnome.org/viewvc/gedit?rev=6120&view=rev
Log:
2008-01-24 Paolo Borelli <pborelli katamail com>
* gedit/gedit-utils.c: use X functions only when GDK_WINDOWING_X11
is defined.
Modified:
trunk/ChangeLog
trunk/gedit/gedit-utils.c
Modified: trunk/gedit/gedit-utils.c
==============================================================================
--- trunk/gedit/gedit-utils.c (original)
+++ trunk/gedit/gedit-utils.c Thu Jan 24 22:36:40 2008
@@ -40,11 +40,7 @@
#include <sys/time.h>
#include <fcntl.h>
#include <string.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#include <gdk/gdkx.h>
#include <glib/gunicode.h>
#include <glib/gi18n.h>
#include <glade/glade-xml.h>
@@ -57,6 +53,14 @@
#include "gedit-debug.h"
#include "gedit-convert.h"
+/* For the workspace/viewport stuff */
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xatom.h>
+#endif
+
#define STDIN_DELAY_MICROSECONDS 100000
/* Returns true if uri is a file: uri and is not a chained uri */
@@ -789,6 +793,7 @@
guint
gedit_utils_get_current_workspace (GdkScreen *screen)
{
+#ifdef GDK_WINDOWING_X11
GdkWindow *root_win;
GdkDisplay *display;
Atom type;
@@ -819,6 +824,11 @@
XFree (current_desktop);
return ret;
+#else
+ /* FIXME: on mac etc proably there are native APIs
+ * to get the current workspace etc */
+ return 0;
+#endif
}
/**
@@ -831,6 +841,7 @@
guint
gedit_utils_get_window_workspace (GtkWindow *gtkwindow)
{
+#ifdef GDK_WINDOWING_X11
GdkWindow *window;
GdkDisplay *display;
Atom type;
@@ -862,6 +873,11 @@
XFree (workspace);
return ret;
+#else
+ /* FIXME: on mac etc proably there are native APIs
+ * to get the current workspace etc */
+ return 0;
+#endif
}
/**
@@ -876,6 +892,7 @@
gint *x,
gint *y)
{
+#ifdef GDK_WINDOWING_X11
GdkWindow *root_win;
GdkDisplay *display;
Atom type;
@@ -914,6 +931,12 @@
*x = coordinates[0];
*y = coordinates[1];
XFree (coordinates);
+#else
+ /* FIXME: on mac etc proably there are native APIs
+ * to get the current workspace etc */
+ *x = 0;
+ *y = 0;
+#endif
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]