[devilspie/libwnck3: 2/6] Remove checks for old libwnck and update the requirement to 2.12.0



commit 5f11a9281247b4cbb8c70e9f4bba9efd2c682211
Author: Christian Persch <chpe gnome org>
Date:   Thu May 31 18:14:03 2012 +0200

    Remove checks for old libwnck and update the requirement to 2.12.0
    
    Instead of checking for really old libwnck, just bump the req and
    remove the conditional code.

 configure.in  |   20 ++------------------
 src/actions.c |   12 ------------
 src/xutils.c  |   52 ----------------------------------------------------
 src/xutils.h  |    6 ------
 4 files changed, 2 insertions(+), 88 deletions(-)
---
diff --git a/configure.in b/configure.in
index 5ae76ac..eb81f05 100644
--- a/configure.in
+++ b/configure.in
@@ -24,30 +24,14 @@ AM_GLIB_GNU_GETTEXT
 
 # Check that we actually have the libraries required to build
 PKG_CHECK_MODULES(WNCK,
-        glib-2.0 >= 2.9.1
+        glib-2.0 >= 2.10.0
         gdk-2.0
         gdk-x11-2.0
         x11
-        libwnck-1.0 >= 0.17)
+        libwnck-1.0 >= 2.12.0)
 AC_SUBST(WNCK_CFLAGS)
 AC_SUBST(WNCK_LIBS)
 
-# See if we have new libwnck with timestamp arguments
-PKG_CHECK_MODULES(WNCK_VER, libwnck-1.0 >= 2.9.92,
-		 wnck_new="yes", wnck_new="no")
-if test "x$wnck_new" = "xyes"; then
-        AC_DEFINE(NEED_TIMESTAMPS,1,[Define to 1 if timestamps are needed to wnck functions])
-fi
-
-# Check if we have the set_fullscreen function
-AC_CHECK_LIB(wnck-1, wnck_window_set_fullscreen,
-            have_fullscreen=1, have_fullscreen=0)
-AC_DEFINE_UNQUOTED(HAVE_FULLSCREEN, $have_fullscreen, [set_fullscreen is available])
-
-AC_CHECK_LIB(wnck-1, wnck_window_set_window_type,
-            have_set_wintype=1, have_set_wintype=0)
-AC_DEFINE_UNQUOTED(HAVE_SET_WINDOW_TYPE, $have_set_wintype, [set_window_type is available])
-
 # Check for the POSIX regexpr functions and headers
 AC_CHECK_FUNCS([regcomp regexec regfree])
 AC_CHECK_HEADERS([sys/types.h regex.h])
diff --git a/src/actions.c b/src/actions.c
index 31a0b72..e815cf6 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -291,11 +291,7 @@ ESExpResult *func_unfullscreen(ESExp *f, int argc, ESExpResult **argv, Context *
  * Focus the current window.
  */
 ESExpResult *func_focus(ESExp *f, int argc, ESExpResult **argv, Context *c) {
-#if NEED_TIMESTAMPS
   wnck_window_activate (c->window, GDK_CURRENT_TIME);
-#else
-  wnck_window_activate (c->window);
-#endif
   if (debug) g_printerr (_("Focusing\n"));
   return e_sexp_result_new_bool (f, TRUE);
 }
@@ -349,11 +345,7 @@ ESExpResult *func_minimize(ESExp *f, int argc, ESExpResult **argv, Context *c) {
  * Un-minimise (i.e. restore) the current window.
  */
 ESExpResult *func_unminimize(ESExp *f, int argc, ESExpResult **argv, Context *c) {
-#if NEED_TIMESTAMPS
   wnck_window_unminimize (c->window, GDK_CURRENT_TIME);
-#else
-  wnck_window_unminimize (c->window);
-#endif
   if (debug) g_printerr(_("Un-minimising\n"));
   return e_sexp_result_new_bool (f, TRUE);
 }
@@ -380,11 +372,7 @@ ESExpResult *func_unshade(ESExp *f, int argc, ESExpResult **argv, Context *c) {
  * Close the current window.
  */
 ESExpResult *func_close(ESExp *f, int argc, ESExpResult **argv, Context *c) {
-#if NEED_TIMESTAMPS
   wnck_window_close (c->window, GDK_CURRENT_TIME);
-#else
-  wnck_window_close (c->window);
-#endif
   if (debug) g_printerr(_("Closed\n"));
   return e_sexp_result_new_bool (f, TRUE);
 }
diff --git a/src/xutils.c b/src/xutils.c
index 8a84827..ed3726a 100644
--- a/src/xutils.c
+++ b/src/xutils.c
@@ -296,55 +296,3 @@ my_wnck_get_viewport_start (WnckWindow *win)
     return -1;
   }
 }
-
-#if ! HAVE_SET_WINDOW_TYPE
-/*
- * This function is only available in recent libwncks, so define it here if it
- * isn't present.
- */
-void my_wnck_window_set_window_type (WnckWindow *window, WnckWindowType wintype)
-{
-  Atom atom;
-
-  g_return_if_fail (WNCK_IS_WINDOW (window));
-
-  switch (wintype) {
-  case WNCK_WINDOW_NORMAL:
-    atom = my_wnck_atom_get ("_NET_WM_WINDOW_TYPE_NORMAL");
-    break;
-  case WNCK_WINDOW_DESKTOP:
-    atom = my_wnck_atom_get ("_NET_WM_WINDOW_TYPE_DESKTOP");
-    break;
-  case WNCK_WINDOW_DOCK:
-    atom = my_wnck_atom_get ("_NET_WM_WINDOW_TYPE_DOCK");
-    break;
-  case WNCK_WINDOW_DIALOG:
-    atom = my_wnck_atom_get ("_NET_WM_WINDOW_TYPE_DIALOG");
-    break;
-  case WNCK_WINDOW_MODAL_DIALOG:
-    atom = my_wnck_atom_get ("_NET_WM_WINDOW_TYPE_MODAL_DIALOG");
-    break;
-  case WNCK_WINDOW_TOOLBAR:
-    atom = my_wnck_atom_get ("_NET_WM_WINDOW_TYPE_TOOLBAR");
-    break;
-  case WNCK_WINDOW_MENU:
-    atom = my_wnck_atom_get ("_NET_WM_WINDOW_TYPE_MENU");
-    break;
-  case WNCK_WINDOW_UTILITY:
-    atom = my_wnck_atom_get ("_NET_WM_WINDOW_TYPE_UTILITY");
-    break;
-  case WNCK_WINDOW_SPLASHSCREEN:
-    atom = my_wnck_atom_get ("_NET_WM_WINDOW_TYPE_SPLASHSCREEN");
-    break;
-  default:
-    return;
-  }
-  my_wnck_error_trap_push ();
-
-  XChangeProperty (gdk_x11_get_default_xdisplay (), wnck_window_get_xid(window),
-                   my_wnck_atom_get ("_NET_WM_WINDOW_TYPE"),
-                   XA_ATOM, 32, PropModeReplace, (guchar *)&atom, 1);
-
-  my_wnck_error_trap_pop ();
-}
-#endif
diff --git a/src/xutils.h b/src/xutils.h
index df9bb93..decc458 100644
--- a/src/xutils.h
+++ b/src/xutils.h
@@ -48,12 +48,6 @@ glong my_wnck_get_cardinal (Window xwindow, Atom atom);
 
 int my_wnck_get_viewport_start (WnckWindow *win);
 
-#if ! HAVE_SET_WINDOW_TYPE
-/* Old libwnck doesn't have this, so possibly declare it */
-void my_wnck_window_set_window_type (WnckWindow *window, WnckWindowType wintype);
-#define wnck_window_set_window_type(a, b) my_wnck_window_set_window_type(a, b)
-#endif
-
 G_END_DECLS
 
 #endif /* WNCK_XUTILS_H */



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