Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1264
Registered: September 2007
Senior Contributor
Well.... I'm becoming blind Smile
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

Re: problems with splitter and layouts [message #17191 is a reply to message #17190] Fri, 01 August 2008 21:36 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12962
Registered: November 2005
Ultimate Member
Thanks, patch applied.

Mirek
Re: problems with splitter and layouts [message #17206 is a reply to message #16479] Sat, 02 August 2008 11:43 Go to previous messageGo to next message
cocob is currently offline  cocob
Messages: 156
Registered: January 2008
Experienced Member
thanks it works perfectly
Re: problems with splitter and layouts [message #17212 is a reply to message #17191] Sat, 02 August 2008 16:55 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1264
Registered: September 2007
Senior Contributor
luzr wrote on Fri, 01 August 2008 21:36

Thanks, patch applied.

Mirek


Bad patch (previous post) is on uvs2.
It does no harm, but it does some unnecessary stuffs... please update to the last one (correction of || with &&).
Already ok on svn.

Ciao

Max
Re: problems with splitter and layouts [message #17217 is a reply to message #17212] Sun, 03 August 2008 10:56 Go to previous message
mirek is currently offline  mirek
Messages: 12962
Registered: November 2005
Ultimate Member
mdelfede wrote on Sat, 02 August 2008 10:55

luzr wrote on Fri, 01 August 2008 21:36

Thanks, patch applied.

Mirek


Bad patch (previous post) is on uvs2.
It does no harm, but it does some unnecessary stuffs... please update to the last one (correction of || with &&).
Already ok on svn.

Ciao

Max



Sorry, I have not synced yet...

Mirek
Previous Topic: Pop-up help for Toolbar icons located in wrong display on multidisplay setup
Next Topic: Problem with xfce theme
Goto Forum:
  


Current Time: Thu Dec 03 14:35:40 CET 2020

Total time taken to generate the page: 0.01077 seconds