Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv28866/src/gui
Modified Files:
wxOptionsDlg.cpp wxFolderTree.cpp wxlwindow.cpp
Log Message:
Attempt to have focus following the mouse on Windows. Protected with
EXPERIMENTAL_FOCUS_FOLLOWS.
Index: wxOptionsDlg.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxOptionsDlg.cpp,v
retrieving revision 1.331
retrieving revision 1.332
diff -b -u -2 -r1.331 -r1.332
--- wxOptionsDlg.cpp 17 May 2002 19:03:49 -0000 1.331
+++ wxOptionsDlg.cpp 3 Jun 2002 11:09:09 -0000 1.332
@@ -511,5 +511,9 @@
#ifdef OS_UNIX
ConfigField_AFMPath,
+#endif // OS_UNIX
+#if defined(OS_UNIX) || defined(EXPERIMENTAL_FOCUS_FOLLOWS)
ConfigField_FocusFollowsMouse,
+#endif
+#ifdef OS_UNIX
ConfigField_DockableMenubars,
ConfigField_DockableToolbars,
@@ -1520,5 +1524,9 @@
#ifdef OS_UNIX
{ gettext_noop("&Path where to find AFM files"), Field_Dir, -1
},
+#endif // OS_UNIX
+#if defined(OS_UNIX) || defined(EXPERIMENTAL_FOCUS_FOLLOWS)
{ gettext_noop("&Focus follows mouse"), Field_Bool, -1 },
+#endif
+#ifdef OS_UNIX
{ gettext_noop("Use floating &menu-bars"), Field_Bool, -1 },
{ gettext_noop("Use floating &tool-bars"), Field_Bool, -1 },
@@ -1920,5 +1928,9 @@
#ifdef OS_UNIX
CONFIG_ENTRY(MP_AFMPATH),
+#endif // OS_UNIX
+#if defined(OS_UNIX) || defined(EXPERIMENTAL_FOCUS_FOLLOWS)
CONFIG_ENTRY(MP_FOCUS_FOLLOWSMOUSE),
+#endif
+#ifdef OS_UNIX
CONFIG_ENTRY(MP_DOCKABLE_MENUBARS),
CONFIG_ENTRY(MP_DOCKABLE_TOOLBARS),
Index: wxFolderTree.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxFolderTree.cpp,v
retrieving revision 1.192
retrieving revision 1.193
diff -b -u -2 -r1.192 -r1.193
--- wxFolderTree.cpp 22 Apr 2002 13:39:57 -0000 1.192
+++ wxFolderTree.cpp 3 Jun 2002 11:09:09 -0000 1.193
@@ -361,11 +361,19 @@
virtual bool OnMEvent(MEventData& event);
-#ifdef __WXGTK__
+#if defined(__WXGTK__) || defined(EXPERIMENTAL_FOCUS_FOLLOWS)
void OnMouseMove(wxMouseEvent &event)
{
+#ifdef OS_WIN
+ // workaround for workaround: we have to test this to avoid the frame
+ // containing the list ctrl being raised to the top from behind another top
+ // level frame
+ HWND hwndTop = ::GetForegroundWindow();
+ wxFrame *frame = GetFrame(this);//m_FolderView->m_Frame;
+ if ( frame && frame->GetHWND() == (WXHWND)hwndTop )
+#endif // OS_WIN
if ( m_FocusFollowMode && FindFocus() != this )
SetFocus();
}
-#endif // wxGTK
+#endif
// get the folder tree node object from item id
@@ -547,8 +555,8 @@
bool m_curIsHidden;
-#ifdef __WXGTK__
+#if defined(__WXGTK__) || defined(EXPERIMENTAL_FOCUS_FOLLOWS)
// give focus to the tree when mouse enters it [used under unix only]
bool m_FocusFollowMode;
-#endif // wxGTK
+#endif
// the fg and bg colour names
@@ -701,7 +709,7 @@
EVT_MENU(-1, wxFolderTreeImpl::OnMenuCommand)
-#ifdef __WXGTK__
+#if defined(__WXGTK__) || defined(EXPERIMENTAL_FOCUS_FOLLOWS)
EVT_MOTION (wxFolderTreeImpl::OnMouseMove)
-#endif // wxGTK
+#endif
EVT_IDLE(wxFolderTreeImpl::OnIdle)
@@ -1623,7 +1631,7 @@
m_curIsHidden = false;
-#ifdef __WXGTK__
+#if defined(__WXGTK__) || defined(EXPERIMENTAL_FOCUS_FOLLOWS)
m_FocusFollowMode = READ_APPCONFIG_BOOL(MP_FOCUS_FOLLOWSMOUSE);
-#endif // wxGTK
+#endif
// create an image list and associate it with this control
@@ -2644,7 +2652,7 @@
else if ( ev.GetId() == MEventId_OptionsChange )
{
-#ifdef __WXGTK__
+#if defined(__WXGTK__) || defined(EXPERIMENTAL_FOCUS_FOLLOWS)
m_FocusFollowMode = READ_APPCONFIG_BOOL(MP_FOCUS_FOLLOWSMOUSE);
-#endif // wxGTK
+#endif // wxGTK || EXPERIMENTAL_FOCUS_FOLLOWS
// reread the bg colour setting
Index: wxlwindow.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxlwindow.cpp,v
retrieving revision 1.131
retrieving revision 1.132
diff -b -u -2 -r1.131 -r1.132
--- wxlwindow.cpp 18 Jan 2002 20:08:39 -0000 1.131
+++ wxlwindow.cpp 3 Jun 2002 11:09:09 -0000 1.132
@@ -170,6 +170,6 @@
m_BGbitmap = NULL;
m_ScrollToCursor = false;
-#ifndef __WXMSW__
- m_FocusFollowMode = false;
+#if defined(__WXGTK__) || defined(EXPERIMENTAL_FOCUS_FOLLOWS)
+ m_FocusFollowMode = true; //READ_APPCONFIG_BOOL(MP_FOCUS_FOLLOWSMOUSE);
#endif
SetWordWrap(false);
@@ -267,6 +267,14 @@
wxClientDC dc( this );
PrepareDC( dc );
+#ifdef OS_WIN
+ // we have to test this to avoid the frame
+ // containing the list ctrl being raised to the top from behind another top
+ // level frame
+ HWND hwndTop = ::GetForegroundWindow();
+ wxFrame *frame = GetFrame(this);
+ if ( frame && frame->GetHWND() == (WXHWND)hwndTop )
+#endif // OS_WIN
if ( (eventId != WXLOWIN_MENU_MOUSEMOVE
-#ifndef __WXMSW__
+#if defined(__WXGTK__) || defined(EXPERIMENTAL_FOCUS_FOLLOWS)
|| m_FocusFollowMode
#endif
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates