gnustep / libs-back

The GNUstep gui library is a library of graphical user interface classes written completely in the Objective-C language; the classes are based upon Apple's Cocoa framework (which came from the OpenStep specification). *** Larger patches require copyright assignment to FSF. please file bugs here. ***
http://www.gnustep.org
GNU General Public License v3.0
50 stars 34 forks source link

XGServerEvent.m: unhide app if WindowMaker sends WM_TAKE_FOCUS to window #28

Closed trunkmaster closed 4 years ago

trunkmaster commented 4 years ago

If application (window) receives WM_TAKE_FOCUS in hidden state it means WindowMaker wants us to be unhidden.

Description: There are 2 protocols defined in XGServerWindow.h - WMFHideApplication and WMFHideOtherApplications. These protocols exist to help GNUstep application and WindowMaker notify each other about "Hide" and "Hide Others" actions. There are no protocols for "unhide" action.

Test case steps:

  1. Open application with window opened.
  2. Hide application with "Hide" menu item.
  3. Open WindowMaker's "Windows" menu (middle-click on desktop).
  4. Select hidden application window. Application unhides, activates, restored window is focused (receives) input and "Hide" menu item unselected.
trunkmaster commented 4 years ago

Sure I've made numerous tets. Application hiding performed by WindowMaker. The actual call sequence is the following:

As you can see WindowMaker definitely is not the case when "WM is searching for a window to take focus after each one gets hidden".