Update of /cvsroot/audacity/audacity-src/src/toolbars
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv6091
Modified Files:
ToolManager.cpp
Log Message:
Added a hack for wxGTK to supplement mouse MOTION events to keep window
following
the mouse.
Added wxFRAME_TOOL_WINDOW to indicator frame in an effort to prevent wxGTK from
displaying an icon in the taskbar.
Index: ToolManager.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/toolbars/ToolManager.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ToolManager.cpp 24 Sep 2006 18:11:10 -0000 1.2
+++ ToolManager.cpp 8 Oct 2006 04:36:19 -0000 1.3
@@ -141,8 +141,9 @@
wxEmptyString,
wxDefaultPosition,
wxSize( 32, 32 ),
+ wxFRAME_TOOL_WINDOW |
wxFRAME_SHAPED |
- wxSIMPLE_BORDER |
+ wxSIMPLE_BORDER |
wxFRAME_NO_TASKBAR |
wxSTAY_ON_TOP );
@@ -766,13 +767,30 @@
//
void ToolManager::OnTimer( wxTimerEvent & event )
{
+ // Initialize the mouse event
+ wxMouseEvent e;
+ wxPoint p( ScreenToClient( wxGetMousePosition() ) );
+ e.m_x = p.x;
+ e.m_y = p.y;
+
+#if defined(__WXGTK__)
+ // When running under GTK, there "seems" to be an issue when Hide()ing
+ // and Show()ing the ferry window in regards to mouse capture and top
+ // level windows. So rather than depend entirely on mouse capture, we
+ // generate our own motion events.
+ if( HasCapture() )
+ {
+ e.SetEventType( wxEVT_MOTION );
+ e.m_leftDown = true;
+ OnMouse( e );
+ }
+#endif
+
// If we've lost capture, simulate a button up event
if( !HasCapture() )
{
- wxMouseEvent e( wxEVT_LEFT_UP );
- wxPoint p( wxGetMousePosition() );
- e.m_x = p.x;
- e.m_y = p.y;
+ e.SetEventType( wxEVT_LEFT_UP );
+ e.m_leftDown = false;
OnMouse( e );
}
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs