While here, refresh WANTLIB, MASTER_SITES (thanks to sthen@ for hosting it) and don't build with the '-g' CFLAG. OK naddy@
149 lines
3.7 KiB
Plaintext
149 lines
3.7 KiB
Plaintext
$OpenBSD: patch-wm_c,v 1.4 2021/02/07 22:55:38 cwen Exp $
|
|
|
|
Hunk #1: fix the build with -fno-common
|
|
|
|
Index: wm.c
|
|
--- wm.c.orig
|
|
+++ wm.c
|
|
@@ -43,7 +43,47 @@
|
|
#define WIN_STATE_FIXED_POSITION (1<<8) /*window is fixed in position even*/
|
|
#define WIN_STATE_ARRANGE_IGNORE (1<<9) /*ignore for auto arranging*/
|
|
|
|
+Atom
|
|
+ /* Generic atoms */
|
|
+ XA_WM_STATE,
|
|
+ WM_CLIENT_LEADER,
|
|
+ XA_UTF8_STRING,
|
|
|
|
+ /* Root pixmap / wallpaper atoms */
|
|
+ _XROOTPMAP_ID,
|
|
+ ESETROOT_PMAP_ID,
|
|
+
|
|
+ /* NetWM atoms */
|
|
+ _NET_SUPPORTING_WM_CHECK,
|
|
+ _NET_SUPPORTED,
|
|
+ _NET_NUMBER_OF_DESKTOPS,
|
|
+ _NET_CLIENT_LIST,
|
|
+ _NET_CLIENT_LIST_STACKING,
|
|
+ _NET_CURRENT_DESKTOP,
|
|
+ _NET_WM_DESKTOP,
|
|
+ _NET_WM_STATE,
|
|
+ _NET_WM_STATE_HIDDEN,
|
|
+ _NET_WM_STATE_SKIP_TASKBAR,
|
|
+ _NET_WM_STATE_SKIP_PAGER,
|
|
+ _NET_WM_STATE_FULLSCREEN,
|
|
+ _NET_WM_STATE_SHADED,
|
|
+ _NET_WM_STATE_ABOVE,
|
|
+ _NET_WM_STATE_STICKY,
|
|
+ _NET_WM_WINDOW_TYPE,
|
|
+ _NET_WM_WINDOW_TYPE_DESKTOP,
|
|
+ _NET_WM_WINDOW_TYPE_DOCK,
|
|
+ _NET_WM_VISIBLE_NAME,
|
|
+ _NET_WM_NAME,
|
|
+
|
|
+ /* Old gnome atoms */
|
|
+ _WIN_SUPPORTING_WM_CHECK,
|
|
+ _WIN_WORKSPACE,
|
|
+ _WIN_WORKSPACE_COUNT,
|
|
+ _WIN_PROTOCOLS,
|
|
+ _WIN_CLIENT_LIST,
|
|
+ _WIN_STATE,
|
|
+ _WIN_HINTS;
|
|
+
|
|
static int WM_PERSONALITY = WM_PERSONALITY_NETWM,
|
|
NETWM_HAS_FULLSCREEN = 0,
|
|
IGNORE_SKIP_TASKBAR = 0;
|
|
@@ -258,7 +298,7 @@ wm_get_stack(Display *dpy)
|
|
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 +333,10 @@ wm_get_root_pmap(Display *dpy)
|
|
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 +349,7 @@ wm_get_current_desktop(Display *dpy)
|
|
if(status != Success)
|
|
return 0;
|
|
if(items_read)
|
|
- desktop = ((CARD32*)data)[0];
|
|
+ desktop = ((unsigned long*)data)[0];
|
|
XFree(data);
|
|
|
|
return desktop;
|
|
@@ -479,7 +519,7 @@ wm_validate_window(Display *dpy, Window win)
|
|
|
|
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 +530,7 @@ wm_validate_window(Display *dpy, Window win)
|
|
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 +550,7 @@ wm_validate_window(Display *dpy, Window win)
|
|
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 +560,14 @@ wm_validate_window(Display *dpy, Window win)
|
|
}
|
|
}
|
|
|
|
-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 +577,7 @@ wm_get_window_desktop(Display *dpy, Window win)
|
|
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 +595,7 @@ wm_get_window_desktop(Display *dpy, Window win)
|
|
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);
|
|
|