https://bugs.kde.org/show_bug.cgi?id=205597 Summary: XSetWMNormalHints ( .. PResizeInc ) shrinks the window Product: kwin Version: unspecified Platform: SuSE RPMs OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general AssignedTo: kwin@kde.org ReportedBy: scm@heisch.inka.de Version: (using KDE 4.3.0) Compiler: gcc 4.3.34 OS: Linux Installed from: SuSE RPMs If XSetWMNormalHints manipulate PResizeInc, the window shrinks. Normally, it should not change, onla the grif for next manual resize should be set. This is a demonstration program: // List: kwin // kore of this example was stolen from // Subject: [Bug 120353] New: XSetWMNormalHints / PMaxSize doesn't work correctly // From: dmitry from spb // Version: KWin 3.0 (using KDE 3.5.10) // Installed from: Opensuse 11.1 // OS: Linux // Please, run the attached test case. // 1. You will see the simple window. // 2. You will see, how the window. is shrinking. // SOURCE CODE // =============================== // gcc X11-Grid.c -L /usr/X11R6/lib -l X11 #include #include #include #define BORDER_WIDTH 2 /* Program wide globals */ Display *theDisplay; int theScreen; int theDepth; XSizeHints theSizeHints; Window OpenWindow(int x, int y, int width, int height, int flag) { XSetWindowAttributes theWindowAttributes; unsigned long theWindowMask; XWMHints theWMHints; Window theNewWindow; long supplied_return; /*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); theSizeHints.flags = PPosition | PSize | PMaxSize | PResizeInc; theSizeHints.x = x; theSizeHints.y = y; theSizeHints.width = width; theSizeHints.height = height; theSizeHints.max_width = 1000; theSizeHints.max_height = 800; theSizeHints.width_inc = 10; theSizeHints.height_inc = 10; XSetWMNormalHints(theDisplay,theNewWindow,&theSizeHints); XMapWindow(theDisplay,theNewWindow); XFlush(theDisplay); return theNewWindow; } int main(void){ Window theWindow; int i; theDisplay = XOpenDisplay(NULL); theScreen = DefaultScreen(theDisplay); theDepth = DefaultDepth(theDisplay,theScreen); theWindow = OpenWindow(150,150,500,500,0); XFlush(theDisplay); /* here, the window is shrinking */ for (i=0;i<20;i++) { usleep(100000L); theSizeHints.flags |= PResizeInc; theSizeHints.width_inc = 10+i; theSizeHints.height_inc = 10+i; XSetWMNormalHints(theDisplay,theWindow,&theSizeHints); XMapWindow(theDisplay,theWindow); XFlush(theDisplay); } sleep(2); XDestroyWindow(theDisplay,theWindow); } -- Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ kwin mailing list kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin