From: <co...@us...> - 2003-04-12 20:30:28
|
Update of /cvsroot/interfacewm/interfacewm In directory sc8-pr-cvs1:/tmp/cvs-serv15153 Modified Files: IWMWindowManager.h IWMWindowManager.m IWMClient.m Log Message: - add methods to conform to _NET_WM_CLIENT_LIST - make IWMWindowManager's -rootWindow method return IWMWindow - update IWMClient's -moveToScreenNumber: add _NET_WM_STATE_STICKY if flaged for all desktops Index: IWMWindowManager.h =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMWindowManager.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** IWMWindowManager.h 12 Apr 2003 02:10:43 -0000 1.8 --- IWMWindowManager.h 12 Apr 2003 20:30:24 -0000 1.9 *************** *** 169,172 **** --- 169,175 ---- - (NSArray *)clientReferences; + - (void)updateClientWindowList; + - (Window *)clientWindowList; + /* * @method availableIconCoordinates Index: IWMWindowManager.m =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMWindowManager.m,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** IWMWindowManager.m 12 Apr 2003 02:10:43 -0000 1.10 --- IWMWindowManager.m 12 Apr 2003 20:30:24 -0000 1.11 *************** *** 582,585 **** --- 582,588 ---- *==========================================================================*/ + /* + * XXX - this needs to either go, or be better thought out + */ - (NSArray *)clientReferences { *************** *** 602,605 **** --- 605,639 ---- } + - (void)updateClientWindowList + { + int count; + + if ((count = [clientArray count])) + { + Window *windowList; + + for (i = 0; i < count; i++) + { + windowList[i] = [[clientArray objectAtIndex:i] xWindow]; + } + + // XXX - update _NET_CLIENT_LIST + [[self rootWindow] setProperty:atoms->net_client_list + type:XA_WINDOW data:(unsigned char *)windowList count:i]; + } + } + + - (Window *)clientWindowList + { + Window *windowList = NULL; + int count; + + // XXX - obtain _NET_CLIENT_LIST + windows = (Window *)[[self rootWindow] property:atoms->net_client_list + type:XA_WINDOW count:&count]; + + return windows; + } + - (NSRect)availableIconCoordinates { *************** *** 854,857 **** --- 888,892 ---- [clientArray addObject:aClient]; [self setHeadClient:aClient]; + [self updateClientWindowList]; } *************** *** 861,864 **** --- 896,900 ---- [clientArray removeObject:aClient]; + [self updateClientWindowList]; [pool release]; } *************** *** 1362,1367 **** [aClient focus]; // set _NET_ACTIVE_WINDOW property ! [[[self currentScreen] rootWindow] setProperty:atoms.net_active_window type:XA_WINDOW format:32 data:(unsigned char *)[[aClient window] xWindow] count:1]; --- 1398,1405 ---- [aClient focus]; + [self updateClientWindowList]; + // set _NET_ACTIVE_WINDOW property ! [[self rootWindow] setProperty:atoms.net_active_window type:XA_WINDOW format:32 data:(unsigned char *)[[aClient window] xWindow] count:1]; *************** *** 1416,1420 **** - (Window)rootWindow { ! return [[self currentScreen] rootXWindow]; } --- 1454,1458 ---- - (Window)rootWindow { ! return [[self currentScreen] rootWindow]; } *************** *** 1555,1559 **** ( _sensitiveHandling || (event->resourceid == ! RootWindow(display, [GlobalIWM rootWindow])) ) ) { NSLog(@"Root window unavailable. Exiting."); --- 1593,1597 ---- ( _sensitiveHandling || (event->resourceid == ! RootWindow(display, [[GlobalIWM rootWindow] xWindow])) ) ) { NSLog(@"Root window unavailable. Exiting."); Index: IWMClient.m =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMClient.m,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** IWMClient.m 12 Apr 2003 02:10:42 -0000 1.11 --- IWMClient.m 12 Apr 2003 20:30:24 -0000 1.12 *************** *** 1361,1373 **** --- 1361,1386 ---- { CARD32 data[1]; + BOOL make_sticky = NO; if (NULL == aScreen) + { data[0] = 0xFFFFFFFF; // all desktops + make_sticky = YES; + } else + { data[0] = aScreen; + } [window setProperty:GlobalIWM->atoms.net_wm_desktop type:XA_CARDINAL format:32 data:(unsigned char *)data elements:1]; + // update _NET_WM_STATE to include _NET_WM_STATE_STICKY + if (make_sticky) + { + _descriptor.state.sticky = YES; + [self updateWindowState]; + } + #ifdef DEBUG fprintf(stderr, "-> Moved client to screen %i\n", (aScreen) ? aScreen : -1); |