This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] + Re: [ANNOUNCEMENT] Server Test 57


Harold Hunt wrote:
Jehan,

That last message fired off before I was done... my Ctrl key is sticking so
when I hit Enter it sent a Ctrl+Enter, which sends the message.


I don't think you need to manage the cursor in WM_ACTIVATEAPP, managing
it in WM_ACTIVATE should be enough because, if I'm not wrong, XWin will
always receive a WM_ACTIVATE with a WM_ACTIVATEAPP.

Then again, your version gets trapped in a state where the cursor is shown,
whereas I haven't seen that problem with Test57 yet :)
Actually, I'm now using Test57, and I haven't seen my problem either.
And I was not saying that this was related to my problem, I'm just saying that it looks like unecessary code.



I remember spending a *lot* of time reading the docs about WM_ACTIVATE and
WM_ACTIVATEAPP to figure out where to show and hide the cursor.  There were
constant bug repots until I got it right, so I'm going to tend to believe
that the show/hide in WM_ACTIVATEAPP is required, until someone presents me
with some sample code and documentation exerpts that shows me that 1)
they've spent more time on the problem than I have and 2) that the show/hide
code in WM_ACTIVATEAPP is indeed not needed.
But the code changed since and got simplified a lot, especially everything about hiding/showing the cursor the previous screen and all that stuff is gone. So maybe the bug has been flushed with the code :).
But that's true that it doesn't cost much to have it anyway and that you're the boss (^_^)

By the way, here is another patch that should prevent some problems with multiroot systems (not tested).

Jehan

--- hw/xwin.orig/winwndproc.c	2002-06-08 18:46:26.000000000 -0700
+++ hw/xwin/winwndproc.c	2002-06-09 13:47:32.000000000 -0700
@@ -418,20 +418,27 @@
 #endif
 
       /* Hide or show the Windows mouse cursor */
-      if ((LOWORD(wParam) == WA_ACTIVE
-		|| LOWORD(wParam) == WA_CLICKACTIVE)
-	       && fCursor)
+      if ((LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE))
 	{
-	  /* Hide Windows cursor */
-	  fCursor = FALSE;
-	  ShowCursor (FALSE);
+	  if (fCursor)
+	    {
+	      /* Hide Windows cursor */
+	      fCursor = FALSE;
+	      ShowCursor (FALSE);
+	    }
+	    
+	  pScreenPriv->fActive = TRUE;
 	}
-      else if (LOWORD(wParam) == WA_INACTIVE
-	       && !fCursor)
+      else if (LOWORD(wParam) == WA_INACTIVE)
 	{
-	  /* Show Windows cursor */
-	  fCursor = TRUE;
-	  ShowCursor (TRUE);
+	  if (!fCursor)
+	    {
+	      /* Show Windows cursor */
+	      fCursor = TRUE;
+	      ShowCursor (TRUE);
+	    }
+
+	  pScreenPriv->fActive = FALSE;
 	}
       return 0;
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]