Fixes for 64bit arches. Update Wantlib. ok pval@

This commit is contained in:
matthieu 2005-03-22 20:29:44 +00:00
parent 21468e9802
commit d7ecede10d
5 changed files with 149 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.2 2004/12/19 17:27:01 alek Exp $
# $OpenBSD: Makefile,v 1.3 2005/03/22 20:29:44 matthieu Exp $
COMMENT= "a full-screen X11 task-switcher like Apple's Expose"
@ -15,7 +15,8 @@ PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= X11 Xext Xft Xinerama Xrender c fontconfig freetype m
WANTLIB= Imlib2 X11 Xext Xft Xinerama Xrender c \
fontconfig freetype m
USE_X11= Yes

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-clientwin_c,v 1.1 2005/03/22 20:29:44 matthieu Exp $
--- clientwin.c.orig Sat Jan 22 16:10:02 2005
+++ clientwin.c Sat Jan 22 16:10:51 2005
@@ -33,7 +33,7 @@
clientwin_validate_func(dlist *l, void *data)
{
ClientWin *cw = (ClientWin *)l->data;
- CARD32 desktop = (*(CARD32*)data),
+ unsigned long desktop = (*(unsigned long*)data),
w_desktop = wm_get_window_desktop(cw->mainwin->dpy, cw->client.window);
#ifdef XINERAMA
@@ -43,7 +43,7 @@
return 0;
#endif
- return (w_desktop == (CARD32)-1 || desktop == w_desktop) &&
+ return (w_desktop == (unsigned long)-1 || desktop == w_desktop) &&
wm_validate_window(cw->mainwin->dpy, cw->client.window);
}

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-skippy_c,v 1.1 2005/03/22 20:29:44 matthieu Exp $
--- skippy.c.orig Sat Jan 22 16:11:17 2005
+++ skippy.c Sat Jan 22 16:11:33 2005
@@ -72,7 +72,7 @@
int die = 0;
dlist *iter, *tmp;
Window dummy_w, *tree_windows;
- CARD32 desktop = wm_get_current_desktop(mw->dpy);
+ unsigned long desktop = wm_get_current_desktop(mw->dpy);
Bool refocus = False;
/* Update the main window's geometry (and Xinerama info if applicable) */

View File

@ -0,0 +1,95 @@
--- wm.c.orig Wed May 19 23:23:49 2004
+++ wm.c Sat Jan 22 16:14:40 2005
@@ -258,7 +258,7 @@
return 0;
for(i = 0; i < items_read; i++)
- l = dlist_add(l, (void*)((CARD32*)data)[i]);
+ l = dlist_add(l, (void*)((unsigned long*)data)[i]);
XFree(data);
@@ -293,10 +293,10 @@
return rootpmap;
}
-CARD32
+unsigned long
wm_get_current_desktop(Display *dpy)
{
- CARD32 desktop = 0;
+ unsigned long desktop = 0;
unsigned char *data;
int status, real_format;
Atom real_type;
@@ -309,7 +309,7 @@
if(status != Success)
return 0;
if(items_read)
- desktop = ((CARD32*)data)[0];
+ desktop = ((unsigned long*)data)[0];
XFree(data);
return desktop;
@@ -479,7 +479,7 @@
return result;
} else {
- CARD32 attr;
+ unsigned long attr;
status = XGetWindowProperty(dpy, win, _WIN_STATE,
0L, 1L, False, XA_CARDINAL, &real_type, &real_format,
@@ -490,7 +490,7 @@
XFree(data);
return 0;
}
- attr = (((CARD32*)data)[0]) & (WIN_STATE_MINIMIZED |
+ attr = (((unsigned long*)data)[0]) & (WIN_STATE_MINIMIZED |
WIN_STATE_SHADED |
WIN_STATE_HIDDEN);
if(attr)
@@ -510,7 +510,7 @@
XFree(data);
return 1; /* If there's no _WIN_HINTS, assume it's 0, thus valid */
}
- attr = ((CARD32*)data)[0];
+ attr = ((unsigned long*)data)[0];
if(attr & WIN_HINTS_SKIP_TASKBAR)
result = 0;
XFree(data);
@@ -520,14 +520,14 @@
}
}
-CARD32
+unsigned long
wm_get_window_desktop(Display *dpy, Window win)
{
int status, real_format;
Atom real_type;
unsigned long items_read, items_left;
unsigned char *data;
- CARD32 desktop = 0;
+ unsigned long desktop = 0;
if(WM_PERSONALITY == WM_PERSONALITY_GNOME)
{
@@ -537,7 +537,7 @@
if(status == Success)
{
if(items_read)
- desktop = (((CARD32*)data)[0] & WIN_STATE_STICKY) ? (CARD32)-1 : 0;
+ desktop = (((unsigned long*)data)[0] & WIN_STATE_STICKY) ? (unsigned long)-1 : 0;
XFree(data);
@@ -555,7 +555,7 @@
return wm_get_current_desktop(dpy);
if(items_read)
- desktop = ((CARD32*)data)[0];
+ desktop = ((unsigned long*)data)[0];
else
desktop = wm_get_current_desktop(dpy);

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-wm_h,v 1.1 2005/03/22 20:29:44 matthieu Exp $
--- wm.h.orig Sat Jan 22 16:09:11 2005
+++ wm.h Sat Jan 22 16:09:11 2005
@@ -66,12 +66,12 @@
void wm_use_netwm_fullscreen(Bool b);
dlist *wm_get_stack(Display *dpy);
Pixmap wm_get_root_pmap(Display *dpy);
-CARD32 wm_get_current_desktop(Display *dpy);
+unsigned long wm_get_current_desktop(Display *dpy);
FcChar8 *wm_get_window_title(Display *dpy, Window window, int *length_return);
Window wm_get_group_leader(Display *dpy, Window window);
void wm_set_fullscreen(Display *dpy, Window window, int x, int y, unsigned int width, unsigned int height);
int wm_validate_window(Display *dpy, Window win);
-CARD32 wm_get_window_desktop(Display *dpy, Window win);
+unsigned long wm_get_window_desktop(Display *dpy, Window win);
Window wm_get_focused(Display *dpy);
void wm_ignore_skip_taskbar(Bool b);