From: <co...@us...> - 2003-11-30 18:40:18
|
Update of /cvsroot/interfacewm/interfacewm In directory sc8-pr-cvs1:/tmp/cvs-serv4106 Modified Files: IWMClient.h IWMClient.m Log Message: cleanup, fix borderWidth problem, fix -windowForXWindow: method Index: IWMClient.h =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMClient.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** IWMClient.h 28 Nov 2003 06:11:52 -0000 1.22 --- IWMClient.h 30 Nov 2003 18:40:15 -0000 1.23 *************** *** 123,137 **** - initializeDecorations; ! /*! ! * @method initializeDecorations_NET ! * @discussion Initializes the client's decor by checking for EWMH properties ! */ ! - initializeDecorations_NET; ! ! /*! ! * @method initializeDecorations_MOTIF ! * @discussion Initializes the client's decor by checking for MOTIF properties ! */ ! - initializeDecorations_MOTIF; /*! --- 123,128 ---- - initializeDecorations; ! - initializeEWMHDecorations; ! - initializeMOTIFDecorations; /*! Index: IWMClient.m =================================================================== RCS file: /cvsroot/interfacewm/interfacewm/IWMClient.m,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** IWMClient.m 28 Nov 2003 06:11:52 -0000 1.32 --- IWMClient.m 30 Nov 2003 18:40:15 -0000 1.33 *************** *** 149,152 **** --- 149,155 ---- maximumSize.width = sizeHints->max_width; maximumSize.height = sizeHints->max_height; + + IWMDebug(@"Maximum size: %i x %i", (int)maximumSize.width, + (int)maximumSize.height); } *************** *** 202,208 **** decor.icon = YES; ! if (![self initializeDecorations_NET]) { ! [self initializeDecorations_MOTIF]; } --- 205,211 ---- decor.icon = YES; ! if (![self initializeEWMHDecorations]) { ! [self initializeMOTIFDecorations]; } *************** *** 210,214 **** } ! - initializeDecorations_NET { Atom *data; --- 213,217 ---- } ! - initializeEWMHDecorations { Atom *data; *************** *** 224,232 **** { IWMDebug(@"Initializing decor via EWMH hints...", nil); if (data[0] == GlobalIWM->atoms.net_wm_window_type_desktop) { } ! else if (data[0] == GlobalIWM->atoms.net_wm_window_type_dock) { decor.resizebar = NO; --- 227,237 ---- { IWMDebug(@"Initializing decor via EWMH hints...", nil); + IWMDebug(@"EWMH hint: %s", XGetAtomName(GlobalDisplay, data[0])); if (data[0] == GlobalIWM->atoms.net_wm_window_type_desktop) { } ! else if (data[0] == GlobalIWM->atoms.net_wm_window_type_dock || ! data[0] == GlobalIWM->atoms.kde_net_wm_window_type_override) { decor.resizebar = NO; *************** *** 235,238 **** --- 240,244 ---- decor.close_button = NO; decor.minimize_button = NO; + decor.border = NO; if ([[window xClassInstance] isEqualToString:@"GNUstep"]) *************** *** 258,261 **** --- 264,268 ---- decor.close_button = NO; decor.minimize_button = NO; + decor.border = NO; } else if (data[0] == GlobalIWM->atoms.net_wm_window_type_dialog) *************** *** 302,306 **** } ! - initializeDecorations_MOTIF { //int num; --- 309,313 ---- } ! - initializeMOTIFDecorations { //int num; *************** *** 554,560 **** if (![GlobalIWM grabPointerAndServer]) - { return (void)0x0; - } // update outline frame --- 561,565 ---- *************** *** 569,575 **** if (!opaque) - { [self drawOutline]; - } for (;;) --- 574,578 ---- *************** *** 603,606 **** --- 606,610 ---- if (!opaque) [self drawOutline]; + [self setFrame:_outline]; [GlobalIWM ungrabPointerAndServer]; return (void)0x0; *************** *** 754,758 **** _cached_size.size.width = [self width]; ! frame.size.width = iwm_display_width([self screen]) - BORDER_WIDTH; frame.size.height = [self height]; --- 758,762 ---- _cached_size.size.width = [self width]; ! frame.size.width = iwm_display_width([self screen]) - [self borderWidth]; frame.size.height = [self height]; *************** *** 780,784 **** frame.size.width = [self width]; ! frame.size.height = iwm_display_height([self screen]) - BORDER_WIDTH; frame.origin.x = ([parent origin]).x; frame.origin.y = 0; --- 784,788 ---- frame.size.width = [self width]; ! frame.size.height = iwm_display_height([self screen]) - [self borderWidth]; frame.origin.x = ([parent origin]).x; frame.origin.y = 0; *************** *** 925,929 **** [window raise]; - //[self redraw]; [window takeInputFocus]; --- 929,932 ---- *************** *** 1290,1298 **** if (decor.titlebar && titlebar) { ! if ((aWindow == titlebar->xWindow) || ! (aWindow == ([titlebar closeButton])->xWindow) || ! (aWindow == ([titlebar minimizeButton])->xWindow)) ! { return YES; } } --- 1293,1309 ---- if (decor.titlebar && titlebar) { ! if (aWindow == titlebar->xWindow) return YES; + + if (decor.minimize_button) + { + if (aWindow == ([titlebar minimizeButton])->xWindow) + return YES; + } + + if (decor.close_button) + { + if (aWindow == ([titlebar closeButton])->xWindow) + return YES; } } *************** *** 1383,1387 **** - (int)borderWidth { ! return 0;//(decor.border ? BORDER_WIDTH : 0); } --- 1394,1398 ---- - (int)borderWidth { ! return (decor.border ? BORDER_WIDTH : 0); } *************** *** 1407,1411 **** XGrabServer(GlobalDisplay); ! adjustment = BORDER_WIDTH * 2; windowHeight = (int)aRect.size.height - [self titlebarHeight] - [self resizebarHeight] - adjustment; --- 1418,1422 ---- XGrabServer(GlobalDisplay); ! adjustment = [self borderWidth] * 2; windowHeight = (int)aRect.size.height - [self titlebarHeight] - [self resizebarHeight] - adjustment; *************** *** 1477,1481 **** size.width = [parent width]; ! size.height = [self titlebarHeight] + [window height] + [self resizebarHeight]; return size; --- 1488,1493 ---- size.width = [parent width]; ! size.height = [self titlebarHeight] + [window height] + ! [self resizebarHeight]; return size; |