[maemo-commits] [maemo-commits] r17734 - in projects/haf/trunk/libmatchbox2: . debian matchbox/core

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Mar 18 20:06:58 EET 2009
Author: kihamala
Date: 2009-03-18 20:06:50 +0200 (Wed, 18 Mar 2009)
New Revision: 17734

Modified:
   projects/haf/trunk/libmatchbox2/ChangeLog
   projects/haf/trunk/libmatchbox2/debian/changelog
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c
   projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.h
Log:
remove base_foo()
remove mb_wm_init_cursors() and mb_wm_set_cursor(), and replace them with
XFixesHideCursor() call.



Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog	2009-03-18 18:04:05 UTC (rev 17733)
+++ projects/haf/trunk/libmatchbox2/ChangeLog	2009-03-18 18:06:50 UTC (rev 17734)
@@ -1,3 +1,12 @@
+2009-03-18  Kimmo Hämäläinen  <kimmo.hamalainen at nokia.com>
+
+	* matchbox/core/mb-wm-client-base.[ch] (base_foo): Removed, does
+	not seem to be necessary hack anymore...
+	* matchbox/core/mb-window-manager.c (mb_wm_set_cursor,
+	mb_wm_init_cursors): Removed. Also remove call to base_foo.
+	(mb_window_manager_init): Replace mb_wm_init_cursors call with
+	XFixesHideCursor call.
+
 2009-03-17  Adam Endrodi  <adam.endrodi at blumsoft.eu>
 
 	NB#105933 Only close controls of thumbnails are shown in the switcher

Modified: projects/haf/trunk/libmatchbox2/debian/changelog
===================================================================
--- projects/haf/trunk/libmatchbox2/debian/changelog	2009-03-18 18:04:05 UTC (rev 17733)
+++ projects/haf/trunk/libmatchbox2/debian/changelog	2009-03-18 18:06:50 UTC (rev 17734)
@@ -1,6 +1,7 @@
 matchbox-window-manager-2 (0.2.22-1~unreleased) unstable; urgency=low
 
   * Stop exporting some internal symbols.
+  * Make the cursor invisible using XFixesHideCursor() for the root window.
 
  -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Fri, 13 Mar 2009 08:25:02 +0200
 

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c	2009-03-18 18:04:05 UTC (rev 17733)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c	2009-03-18 18:06:50 UTC (rev 17734)
@@ -51,15 +51,9 @@
 #include <X11/Xmd.h>
 
 #ifdef HAVE_XFIXES
-#include <X11/extensions/Xfixes.h> /* Used to *really* hide cursor */
+#include <X11/extensions/Xfixes.h> /* Used to hide the cursor */
 #endif
 
-#ifdef HAVE_XCURSOR
-#include <X11/Xcursor/Xcursor.h>
-#endif
-
-#include <X11/cursorfont.h>
-
 static void
 mb_wm_process_cmdline (MBWindowManager *wm);
 
@@ -93,9 +87,6 @@
 mb_wm_set_n_desktops (MBWindowManager *wm, int n_desktops);
 
 static void
-mb_wm_set_cursor (MBWindowManager * wm, MBWindowManagerCursor cursor);
-
-static void
 mb_wm_set_theme (MBWindowManager *wm, MBWMTheme * theme);
 
 static MBWindowManagerClient*
@@ -1531,27 +1522,6 @@
   return 1;
 }
 
-static void
-mb_wm_init_cursors (MBWindowManager * wm)
-{
-    XColor col;
-    Pixmap pix = XCreatePixmap (wm->xdpy, wm->root_win->xwindow, 1, 1, 1);
-
-    memset (&col, 0, sizeof (col));
-
-    wm->cursors[MBWindowManagerCursorNone] =
-      XCreatePixmapCursor (wm->xdpy, pix, pix, &col, &col, 1, 1);
-
-    XFreePixmap (wm->xdpy, pix);
-
-    wm->cursors[MBWindowManagerCursorLeftPtr] =
-      XCreateFontCursor(wm->xdpy, XC_left_ptr);
-
-    MBWM_ASSERT (wm->cursors[_MBWindowManagerCursorLast - 1] != 0);
-
-    mb_wm_set_cursor (wm, MBWindowManagerCursorLeftPtr);
-}
-
 #if ENABLE_COMPOSITE
 static Bool
 mb_wm_init_comp_extensions (MBWindowManager *wm)
@@ -1745,10 +1715,10 @@
 
   mb_wm_keys_init(wm);
 
-  mb_wm_init_cursors (wm);
+#ifdef HAVE_XFIXES
+  XFixesHideCursor (wm->xdpy, wm->root_win->xwindow);
+#endif
 
-  base_foo ();
-
   return 1;
 }
 
@@ -2187,55 +2157,6 @@
   mb_wm_set_theme (wm, theme);
 }
 
-static void
-mb_wm_set_cursor (MBWindowManager * wm, MBWindowManagerCursor cursor)
-{
-  static int major = 0, minor = 0, ev_base, err_base;
-  Display * dpy;
-  Window    rwin;
-
-  if (wm->cursor == cursor)
-    return;
-
-  dpy = wm->xdpy;
-  rwin = wm->root_win->xwindow;
-
-  mb_wm_util_trap_x_errors();
-
-#ifdef HAVE_XFIXES
-  if (!major)
-    {
-      if (XFixesQueryExtension (dpy, &ev_base, &err_base))
-	XFixesQueryVersion (dpy, &major, &minor);
-      else
-	major = -1;
-    }
-
-  if (major >= 4)
-    {
-      if (cursor == MBWindowManagerCursorNone)
-	{
-	  XFixesHideCursor (dpy, rwin);
-	}
-      else
-	{
-	  XDefineCursor(dpy, rwin, wm->cursors[cursor]);
-	  XFixesShowCursor (dpy, rwin);
-	  mb_wm_util_trap_x_errors();
-	}
-    }
-  else
-#endif
-    {
-      XDefineCursor(dpy, rwin, wm->cursors[cursor]);
-    }
-
-  XSync (dpy, False);
-
-  if (!mb_wm_util_untrap_x_errors())
-    wm->cursor = cursor;
-}
-
 void __attribute__ ((visibility("hidden")))
 mb_wm_compositing_on (MBWindowManager * wm)
 {

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c	2009-03-18 18:04:05 UTC (rev 17733)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c	2009-03-18 18:06:50 UTC (rev 17734)
@@ -798,10 +798,3 @@
 
   return True;
 }
-
-void base_foo(void)
-{
-  ; /* nasty hack to workaround linking issues WTF...
-     * use .la's rather than .a's ??
-    */
-}

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.h
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.h	2009-03-18 18:04:05 UTC (rev 17733)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.h	2009-03-18 18:06:50 UTC (rev 17734)
@@ -48,7 +48,4 @@
 int
 mb_wm_client_base_class_type ();
 
-/** A nasty hack to work around linking issues. */
-void base_foo(void);
-
 #endif


More information about the maemo-commits mailing list