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 » U++ Library support » TopWindow&PopUp, TrayIcon » Problems with CursorImage/Popups/Frames on X11
Re: Problems with CursorImage/Popups/Frames on X11 [message #13688 is a reply to message #13380] Tue, 22 January 2008 10:52 Go to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Well, turns out I was completely wrong and it *is* possible (at least on KDE) to implement X11 docking with native windows. You have to SetFocus on the window when it's moved so that X11 passes back focus when the move stops. It's pure luck that I did that *and* had an EventDump going at the same time Rolling Eyes

However, during my studies I did find the solution to two of the problems I was having with using pop-ups as main windows.
1) CursorImage not working. In X11Wnd.cpp (ln. 590, SetMouseCursor) there is the following code:
Quote:

if(IsPopUp()) {
Ctrl *tw = GetTopWindow();
if(tw)
w = tw->GetWindow();
w = GetTopCtrl()->GetWindow();
}
This effectively passes all CursorImage events to the owner of the pop-up, and commenting it out makes them work correctly. Presumably there is a good reason for this, but I can't think of a case where this would be necessary at the cost of breaking the behaviour of all other pop-ups. Could it be removed?
2) Popups not overlapping each other properly (not moving to foreground). This can be fixed by replacing line 192/192 in CtrlKbd.cpp (SetFocus0) with:
Quote:

Ptr<Ctrl> topctrl = GetTopCtrl();
Ptr<Ctrl> topwindow = topctrl->IsPopUp() ? topctrl : GetTopWindow();
This is not a serious issue though, since you can manually call SetForground on the popup when it gets focus.

The only remaining problem is the managing of popups (which I thougt would be the easy bit Smile)- ie hiding/showing in accordance to changing in window stacking order, minization etc. - I'm pretty sure you should do this using CirculateRequest/CirculateNotify, but I can't persuade X11 to send me the events even though the eventmask is correct.

I'm now much happier. Thanks for your help.


[Updated on: Tue, 22 January 2008 13:01]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Painting below your window, not bleeding into your window...
Next Topic: Toolbox inside a TopWindow
Goto Forum:
  


Current Time: Sun Jun 08 08:04:54 CEST 2025

Total time taken to generate the page: 0.04369 seconds