1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

Fix app behaviour on Xinerama displays

With Xinerama, on heads other than the primary, certain parts (menus,
scrollbars) of certain types of clients (Qt) are incorrectly or not at
all drawn.

The fix follows other window managers in completely ignoring the
_NET_WORKAREA property.

Problem originally poked at by Ambrus Szabo, correct keyword and the
eventually implemented solution suggested by Lucius Windschuh, typed
up by me.
This commit is contained in:
Tamas TEVESZ
2011-04-10 16:35:02 +02:00
committed by Carlos R. Mafra
parent cbbc1fc9ac
commit af857e8b95
2 changed files with 21 additions and 56 deletions

View File

@@ -68,7 +68,6 @@ static Atom net_desktop_viewport;
static Atom net_current_desktop;
static Atom net_desktop_names;
static Atom net_active_window;
static Atom net_workarea; /* XXX: not xinerama compatible */
static Atom net_supporting_wm_check;
static Atom net_virtual_roots; /* N/A */
static Atom net_desktop_layout; /* XXX */
@@ -144,7 +143,6 @@ static atomitem_t atomNames[] = {
{"_NET_CURRENT_DESKTOP", &net_current_desktop},
{"_NET_DESKTOP_NAMES", &net_desktop_names},
{"_NET_ACTIVE_WINDOW", &net_active_window},
{"_NET_WORKAREA", &net_workarea},
{"_NET_SUPPORTING_WM_CHECK", &net_supporting_wm_check},
{"_NET_VIRTUAL_ROOTS", &net_virtual_roots},
{"_NET_DESKTOP_LAYOUT", &net_desktop_layout},
@@ -253,7 +251,6 @@ static void setSupportedHints(WScreen * scr)
atom[i++] = net_current_desktop;
atom[i++] = net_desktop_names;
atom[i++] = net_active_window;
atom[i++] = net_workarea;
atom[i++] = net_supporting_wm_check;
atom[i++] = net_showing_desktop;
#if 0
@@ -629,32 +626,6 @@ void wNETWMUpdateActions(WWindow * wwin, Bool del)
XA_ATOM, 32, PropModeReplace, (unsigned char *)action, i);
}
void wNETWMUpdateWorkarea(WScreen * scr, WArea usableArea)
{
long *area;
int count, i;
/* XXX: not Xinerama compatible,
xinerama gets the largest available */
if (!scr->netdata || scr->workspace_count == 0)
return;
count = scr->workspace_count * 4;
area = wmalloc(sizeof(long) * count);
for (i = 0; i < scr->workspace_count; i++) {
area[4 * i + 0] = usableArea.x1;
area[4 * i + 1] = usableArea.y1;
area[4 * i + 2] = usableArea.x2 - usableArea.x1;
area[4 * i + 3] = usableArea.y2 - usableArea.y1;
}
XChangeProperty(dpy, scr->root_win, net_workarea, XA_CARDINAL, 32,
PropModeReplace, (unsigned char *)area, count);
wfree(area);
}
Bool wNETWMGetUsableArea(WScreen * scr, int head, WArea * area)
{
WReservedArea *cur;