Home » Developing U++ » Bugs (& fixes) » problems with splitter and layouts
Re: problems with splitter and layouts [message #17190 is a reply to message #17185] |
Fri, 01 August 2008 20:54 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
Well.... I'm becoming blind
Found the true bug, it was an bad '||' instead of '&&'.
Here the patched function...
// Synchronizes the native windows inside ctrls
void Ctrl::SyncNativeWindows(void)
{
ArrayMap<Window, Ctrl::XWindow>& xwindows = Xwindow();
for(int i = 0; i < xwindows.GetCount(); i++)
{
XWindow &xw = xwindows[i];
Window w = xwindows.GetKey(i);
if(xw.ctrl && xw.ctrl->parent && w)
{
Window dummy;
int x, y;
unsigned int width, height, border, depth;
XGetGeometry(Xdisplay, w, &dummy, &x, &y, &width, &height, &border, &depth);
Rect r = xw.ctrl->GetRectInParentWindow();
if( (x != r.left || y != r.top) && ((int)width == r.Width() && (int)height == r.Height()))
XMoveWindow(Xdisplay, w, r.left, r.top);
===>HERE else if( (x == r.left && y == r.top) && ((int)width != r.Width() || (int)height != r.Height()))
XResizeWindow(Xdisplay, w, r.Width(), r.Height());
else if( x != r.left || y != r.top || (int)width != r.Width() || (int)height != r.Height())
XMoveResizeWindow(Xdisplay, w, r.left, r.top, r.Width(), r.Height());
}
}
} // END Ctrl::SyncNativeWindows()
Max
[Updated on: Fri, 01 August 2008 20:55] Report message to a moderator
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 09:24:12 CET 2024
Total time taken to generate the page: 0.01645 seconds
|