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++ » UppHub » Docking - Stable?
Docking - Stable? [message #28179] Fri, 20 August 2010 15:28 Go to next message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
I would like to use the docking code in Bazaar, is it stable (API and relatively bug free)?

Thanks,

Jeremy
Re: Docking - Stable? [message #28182 is a reply to message #28179] Fri, 20 August 2010 15:38 Go to previous messageGo to next message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
Hm, I just realized there are two docking systems in Bazaar? DockCtrl and Docking ? Is there a prefeered one? DockCtrl doesn't seem to have been updated since Nov 2008 while Docking was updated Jul 2010.

Jeremy
Re: Docking - Stable? [message #28184 is a reply to message #28179] Fri, 20 August 2010 19:02 Go to previous messageGo to next message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
I've decided to go w/Docking as it seems to be maintained, not sure about DockCtrl.

BTW... It was very easy to go from my previous "TabCtrl" setup to a docking setup. Very nice!

Jeremy

[Updated on: Fri, 20 August 2010 19:02]

Report message to a moderator

Re: Docking - Stable? [message #28192 is a reply to message #28179] Sat, 21 August 2010 17:54 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
jeremy_c wrote on Fri, 20 August 2010 09:28

I would like to use the docking code in Bazaar, is it stable (API and relatively bug free)?

Thanks,

Jeremy


Docking has problems on Linux. Windows seems to be fine.


Regards,
Novo
Re: Docking - Stable? [message #28194 is a reply to message #28192] Sat, 21 August 2010 18:00 Go to previous messageGo to next message
jeremy_c is currently offline  jeremy_c
Messages: 175
Registered: August 2007
Location: Ohio, USA
Experienced Member
Hm, that's too bad. Any road map for fixing it or is it a dead project? I'm really enjoying it but am on Windows right now.

Jeremy
Re: Docking - Stable? [message #28196 is a reply to message #28194] Sat, 21 August 2010 20:35 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
jeremy_c wrote on Sat, 21 August 2010 12:00

Hm, that's too bad. Any road map for fixing it or is it a dead project? I'm really enjoying it but am on Windows right now.

Jeremy


The problem I'm suffering from is that floating windows cannot be docked back. It looks like a some kind of uninitialized variable to me because it seems to disappear when application is dragged to another workspace. This is just a guess.


Regards,
Novo
Re: Docking - Stable? [message #28215 is a reply to message #28196] Mon, 23 August 2010 15:50 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
The problem with Docking on Linux is to do with the way Window Managers work with X11. Unlike Win32 there is no message from the WM to tell you that the window has moved. Instead I have to watch for a certain series of unrelated events and assume that it's a window move. Unfortunately this is highly dependent on the specifics of the WM implementation. For instance in Ubuntu it will work on the most basic graphics mode but not with any effects enabled, as I cannot find any way of determining a window drag-drop. It's a real pain in the arse.

I'm not sure what problem you are seeing though. I woudln't expect to see the window diappear, just be undockable.
Re: Docking - Stable? [message #28220 is a reply to message #28215] Mon, 23 August 2010 17:34 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
mrjt wrote on Mon, 23 August 2010 09:50


I'm not sure what problem you are seeing though. I woudln't expect to see the window diappear, just be undockable.


It doesn't disappear. It gets undockable.

Another strange situation: I just double-checked DockingExample1/2 on 32 bit Ubuntu 10.04 at work. And they work absolutely perfect. Last week I checked docking with my own application on Ubuntu x64 10.04 at home and it had problems. I will double check that.


Regards,
Novo
Re: Docking - Stable? [message #28224 is a reply to message #28220] Tue, 24 August 2010 05:53 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
I double checked. Docking doesn't work on my home PC. Below are results of an investigation.


Valgrind:

==7405== Conditional jump or move depends on uninitialised value(s)
==7405==    at 0x46C11B: Upp::Splitter::SetStyle(Upp::Splitter::Style const&) (Splitter.cpp:245)
==7405==    by 0x46C26F: Upp::Splitter::Splitter() (Splitter.cpp:262)
==7405==    by 0x5D335A: Upp::DockPane::DockPane() (DockPane.cpp:410)
==7405==    by 0x5BFE80: Upp::DockWindow::DockWindow() (DockWindow.cpp:1469)
==7405==    by 0x40B45E: wnb3::wnb3() (main.cpp:32)
==7405==    by 0x40F3BC: GuiMainFn_() (main.cpp:1344)
==7405==    by 0x40F36B: main (main.cpp:1342)
==7405==  Uninitialised value was created by a stack allocation
==7405==    at 0x40F398: GuiMainFn_() (main.cpp:1343)



Where wnb3 and main.cpp are my class and cpp file.

Uninitialized value: Splitter::Splitter() --> SetStyle(StyleDefault()) --> StyleDefault()


StyleDefault() for some reason returns an uninitialized value. I couldn't track it down more closely. Initialization happens in GUI_APP_MAIN.


Did I miss something in initialization?


Regards,
Novo
Re: Docking - Stable? [message #28297 is a reply to message #28224] Thu, 26 August 2010 17:29 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
That shouldn't have anything to do with it, it's in the CtrlLib code underneath. It's probably this:
Splitter& Splitter::SetStyle(const Style& s)
{
	if(chstyle != &s) {
		chstyle = &s;
		RefreshLayout();
		Refresh();
	}
	return *this;
}

chstyle is technically uninitialised on object construction but the code is perfectly safe.

The docking problem is to do with window manager events. I haven't tried Ubuntu 10.04 because it wierdly doesn't like my hardware but I woudl guess that at work the GUI effects are turned off, whcih makes it work.

I'd love to know how to determine window movement correctly on Ubuntu with GUI Effects on, but everything I've tried so far has failed.
Re: Docking - Stable? [message #28309 is a reply to message #28215] Fri, 27 August 2010 00:21 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
mrjt wrote on Mon, 23 August 2010 15:50

The problem with Docking on Linux is to do with the way Window Managers work with X11. Unlike Win32 there is no message from the WM to tell you that the window has moved. Instead I have to watch for a certain series of unrelated events and assume that it's a window move. Unfortunately this is highly dependent on the specifics of the WM implementation. For instance in Ubuntu it will work on the most basic graphics mode but not with any effects enabled, as I cannot find any way of determining a window drag-drop. It's a real pain in the arse.

I'm not sure what problem you are seeing though. I woudln't expect to see the window diappear, just be undockable.


I've seen that in my X11DHCtrl control the State() handler responds to window move events with a POSITION (100) reason... Isn't that one what you're looking for ?
I've got compiz fully enabled and the State() handler gets called correctly on window moves.
Ubuntu 10.04 64 bit with all effects enabled.

Ciao

Max

Edit : that *MUST* have worked in previous ubuntu releases too, is an important part of X11DHCtrl, I use it to keep native windows in sync with upp ones, and the control is working since about 1-2 years.
You can test it easily putting a breakpoint on line 349 od X11DHCtrl.cpp, and run the small attached test application.
Beware, GlCtrl needs a small patch, it got broken on these days.... see the post http://www.ultimatepp.org/forum/index.php?t=msg&th=5460& amp;start=0&

  • Attachment: TestGL.zip
    (Size: 2.67KB, Downloaded 542 times)

[Updated on: Fri, 27 August 2010 00:28]

Report message to a moderator

Re: Docking - Stable? [message #28315 is a reply to message #28297] Fri, 27 August 2010 04:47 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
Two small changes will make valgrind satisfied.

1) Adding "style = NULL;" before "SetStyle(Splitter::StyleDefault());" in SplitterFrame::SplitterFrame().

2) Adding "chstyle = NULL;" before "SetStyle(StyleDefault());" in Splitter::Splitter().

Could somebody apply these changes to the Trunk, please?

TIA


Regards,
Novo

[Updated on: Fri, 27 August 2010 05:41]

Report message to a moderator

Re: Docking - Stable? [message #28562 is a reply to message #28309] Tue, 07 September 2010 12:02 Go to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
mdelfede wrote on Thu, 26 August 2010 23:21

I've seen that in my X11DHCtrl control the State() handler responds to window move events with a POSITION (100) reason... Isn't that one what you're looking for ?
I've got compiz fully enabled and the State() handler gets called correctly on window moves.
Ubuntu 10.04 64 bit with all effects enabled.

Thanks. I'll check but I think the problem is that the message is only sent after the window has moved, not during the drag operation.
Previous Topic: HelpViewer Class
Next Topic: Docking: How to dock to the entire portion of what remains?
Goto Forum:
  


Current Time: Thu Mar 28 09:13:26 CET 2024

Total time taken to generate the page: 0.01504 seconds