Version: KWin 3.0 (using KDE KDE 3.4.2) Installed from: Slackware Packages OS: Linux Please, run the attached test case. 1. You will see the simple window. 2. Try to maximize this window. BUT no maximize button available. In this test I'm using XSetWMNormalHints / PMaxSize in order to specify maximum size. This leads to removing _NET_WM_ACTION_MAXIMIZE_XXX from _NET_WM_ALLOWED_ACTIONS. This behaviour is different from others window managers (metacity / wmaker). SOURCE CODE =============================== // gcc test.c -L /usr/X11R6/lib -l X11 #include<X11/Xlib.h> #include<X11/Xutil.h> #include<stdio.h> #define BORDER_WIDTH 2 /* Program wide globals */ Display *theDisplay; int theScreen; int theDepth; Window OpenWindow(int x, int y, int width, int height, int flag){ XSetWindowAttributes theWindowAttributes; unsigned long theWindowMask; XSizeHints theSizeHints; XWMHints theWMHints; Window theNewWindow; /*Setting the attributes*/ theWindowAttributes.border_pixel =BlackPixel(theDisplay,theScreen); theWindowAttributes.background_pixel = WhitePixel(theDisplay,theScreen); theWindowAttributes.override_redirect = False; theWindowMask = CWBackPixel|CWBorderPixel|CWOverrideRedirect; theNewWindow = XCreateWindow( theDisplay, RootWindow(theDisplay,theScreen), x,y,width,height, BORDER_WIDTH,theDepth, InputOutput, CopyFromParent, theWindowMask, &theWindowAttributes); theWMHints.initial_state = NormalState; theWMHints.flags = StateHint; XSetWMHints(theDisplay,theNewWindow,&theWMHints); // PMaxSize doesn't work theSizeHints.flags = PPosition | PSize | PMaxSize | PResizeInc; theSizeHints.x = x; theSizeHints.y = y; theSizeHints.width = width; theSizeHints.height = height; theSizeHints.max_width = 200; theSizeHints.max_height = 200; theSizeHints.width_inc = 10; theSizeHints.height_inc = 10; XSetWMNormalHints(theDisplay,theNewWindow,&theSizeHints); XMapWindow(theDisplay,theNewWindow); XFlush(theDisplay); return theNewWindow; } int main(void){ Window theWindow; theDisplay = XOpenDisplay(NULL); theScreen = DefaultScreen(theDisplay); theDepth = DefaultDepth(theDisplay,theScreen); theWindow = OpenWindow(50,50,100,100,0); XFlush(theDisplay); sleep(100); XDestroyWindow(theDisplay,theWindow); }
The window says the maximum size is 200x200. Maximizing would make the window larger than that. *** This bug has been marked as a duplicate of 67577 ***
I thought that PMaxSize hints are supposed to control size for maximized window too. Is there any other way to specify maximum size and keep the window maximizable?
KWin currently interprets "maximized" as "as large as the workarea".