From: KaZeR <ka...@us...> - 2007-10-26 21:46:48
|
Update of /cvsroot/navit/navit/src/gui/sdl In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1427 Added Files: wmcontrol.c wmcontrol.h Log Message: Added wcontrol for nghost switching --- NEW FILE: wmcontrol.c --- // This is loosely based upon wmctrl 1.07. #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <string.h> #include <locale.h> #include <X11/Xlib.h> #include <X11/Xatom.h> #include <X11/cursorfont.h> #include <X11/Xmu/WinUtil.h> #include <glib.h> #include "wmcontrol.h" #define _NET_WM_STATE_REMOVE 0 /* remove/unset property */ #define _NET_WM_STATE_ADD 1 /* add/set property */ [...1254 lines suppressed...] return(target_win); }/*}}}*/ static Window get_active_window(Display *disp) {/*{{{*/ char *prop; unsigned long size; Window ret = (Window)0; prop = get_property(disp, DefaultRootWindow(disp), XA_WINDOW, "_NET_ACTIVE_WINDOW", &size); if (prop) { ret = *((Window*)prop); g_free(prop); } return(ret); }/*}}}*/ --- NEW FILE: wmcontrol.h --- #ifdef __cplusplus extern "C" { #endif int window_switch(); #ifdef __cplusplus } #endif |