dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]Fix to Bug 8984


From: David Logan
Subject: [DotGNU]Fix to Bug 8984
Date: Thu, 20 May 2004 07:03:23 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040316

I have updates to Widget.cs and MdiClientWidget.cs. I do not know who to send the sources to, so they are attached. The problem boils down to this:

Widget.cs: When trying to set the focus of a child window or a child control, we eventually get into Widget.cs, which tries to get the top level window. The top level window is the application window, the top guy (i.e. no parent.) In order to do so, it starts with the current widget, and travels upward through the parent chain until it finds a widget of type "TopLevelWindow". This widget must have the primary focus (i.e. the application itself must have focus, regardless of any child windows.) Otherwise, child windows do not actually *get* the focus, they are just marked as "will get focus" when the application gets the primary focus.

However, MdiClientWidget.cs creates instances of TopLevelWindow as child windows of an MDI application. This causes a problem because Widget.cs cannot distinguish between the actual top level window and the top level windows created by this class. And, of course, the MDI child never has primary focus, because it is not the application window.

My solution was to add a bool to Widget.cs, called "mdiWidget". MdiClientWidget.cs sets this bool to true when it creates MDI child windows. Then Widget.cs knows to keep travelling upward rather than stop there.

David Logan


Attachment: Bug8984.tgz
Description: GNU Zip compressed data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]