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]

Re: focus / windows update problems


Jochen,

Yes, I can reproduce this behavior.

I added the following processing to winTopLevelWindowProc() and would like a review from some other developers. Note: It does fix the problem, but I am not 100% sure that it is correct.

    case WM_WINDOWPOSCHANGED:
      {
	LPWINDOWPOS pwindPos = (LPWINDOWPOS) lParam;

	/* Bail if window z order was not changed */
	if (pwindPos->flags & SWP_NOZORDER)
	  break;

#if CYGMULTIWINDOW_DEBUG
	ErrorF ("winTopLevelWindowProc - hwndInsertAfter: %p\n",
		pwindPos->hwndInsertAfter);
#endif
	
	/* Pass the message to the root window */
	SendMessage (hwndScreen, message, wParam, lParam);
	
	if (s_pScreenPriv != NULL)
	  s_pScreenPriv->fWindowOrderChanged = TRUE;
      }
      return 0;



On a side note, is that a mistake the way that SendMessage is always called before setting the flag in s_pScreenPriv? If it is intended that the root window be able to query that parameter, then it would be a race condition to see whether or not that parameter got set before or after the root window processed the message. Any comments?

Harold

Jochen Küpper wrote:

I started up the Cygwin XFree86 server yesterday again (after many
weeks). Thanks for all the improvements!

I do have a problem with window content updates, though. I am running
latest Cygwin (as of yesterday) on a Win2000 system with "focus
follows mouse policy" (this can be set in TweakUI). Mostly it works
fine for X programs, too.

When I have two overlapping X windows and move the mouse to the back
one it gets focus and everything is as expected. However when I then
click its titlebar to move it to the front the newly shown content is
not redrawn! Only when the window looses focus and regains it the
content will be displayed correctly.

Looks like bringing the window to the front does not trigger the right
signal, i.e. redefining the window area which has to be redrawn.

Feel free to contact me if you need more information.

Greetings,
Jochen


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