nanogui: focuswp and MwDestroyWindow


Previous by date: 25 Oct 2004 18:28:37 +0100 Re: widget toolkit, Hinko Kocevar
Next by date: 25 Oct 2004 18:28:37 +0100 Re: focuswp and MwDestroyWindow, MrWGT
Previous in thread:
Next in thread: 25 Oct 2004 18:28:37 +0100 Re: focuswp and MwDestroyWindow, MrWGT

Subject: focuswp and MwDestroyWindow
From: Shivaji Navale ####@####.####
Date: 25 Oct 2004 18:28:37 +0100
Message-Id: <40492.10.107.1.1.1098724963.squirrel@pc2.ee.iitb.ac.in>

Hi,

In microwindows focuswp is a (global) holding the focused window hwnd.

say MwDestroyWindow is called on destroywp for our case.

If destroywp is in focus without parent, everything goes on well,
However if destroywp is in focus (with parent) the check before SetFocus
is not true and the focuswp is not changed even after the window deletion.

The problem is if we create hwnd's with a single parent and want to destroy
one of the hwnds, the focuswp remains unaltered. And on a subsequent
setfocus for
<snip>
   oldfocus = focuswp;
   SendMessage(oldfocus,..)
<snip>
  we get a segfault.


so for a win 32 implemented code we had to apply a check for the same in
MwDestroyWindow.

<snip>
//additional 2 lines follow
% if(wp == focuswp)
% SetFocus(rootwp->children? rootwp->children: rootwp);

if(wp == MwGetTopWindow(focuswp))
SetFocus(rootwp->children? rootwp->children: rootwp);

<snip>

instead of current implementation.

This should take care of maintaining the global focuswp consistently
for destroywindow with or without parent

Has anybody digged this issue deeper, and would like to share their views.

What will be an appropriate microwindows solution.

Please let me know if this needs further clarification.

Regards
Shivaji






Previous by date: 25 Oct 2004 18:28:37 +0100 Re: widget toolkit, Hinko Kocevar
Next by date: 25 Oct 2004 18:28:37 +0100 Re: focuswp and MwDestroyWindow, MrWGT
Previous in thread:
Next in thread: 25 Oct 2004 18:28:37 +0100 Re: focuswp and MwDestroyWindow, MrWGT


Powered by ezmlm-browse 0.20.