-
Notifications
You must be signed in to change notification settings - Fork 69
Input focus tests
Sergii Stoian edited this page Sep 10, 2020
·
22 revisions
Source - application or window that was active focused before action occurs.
Target - application or window that becomes active or focused.
- Target application:
- clicked window titlebar becomes black
- clicked window ordered front (other app windows should at the old level)
- main menu appeared
- input focus stays on focused window (keyboard presses should go to this window)
- WM’s `scr->focused_window` should point to this window
- Source application:
- previously focused window titlebar becomes gray
- main menu disappeared
- Click on window decorations (title and resize bars).
- handleButtonPress() - event.c
- *desc->handle_mousedown() - event.c
- titlebarMouseDown() - window.c
- wSetFocusTo() - actions.c
- wWindowFocus() - window.c
- wWindowUnfocus() - window.c
- wRaiseFrame()
- wSetFocusTo() - actions.c
- titlebarMouseDown() - window.c
- *desc->handle_mousedown() - event.c
- handleButtonPress() - event.c
- Click inside window (contents managed by the application).
- handleButtonPress() - event.c
- *desc->handle_mousedown() - event.c
- frameMouseDown() - window.c
- wSetFocusTo() - actions.c
- wWindowFocus() - window.c
- wWindowUnfocus() - window.c
- wRaiseFrame()
- wSetFocusTo() - actions.c
- frameMouseDown() - window.c
- *desc->handle_mousedown() - event.c
- handleButtonPress() - event.c
- Click inside GNUstep window
Click inside GNUstep window is not handled by WM. The calls below is event
handling of mapped or focused windows generated by GNUstep actions (main menu
and hidden panels appearance).
- handleMapRequest() - event.c
- wSetFocusTo() - actions.c
- wWindowFocus() - window.c
- wWindowUnfocus() - window.c
- wSetFocusTo() - actions.c
- handleMapRequest() - event.c
- If GNUstep app non-key window was clicked inside, previsous key window is raised. Possible cause of a problem: window click activates application (-activateIgnoringOtherApps:). This leads to ordering front all application windows. It is correct for appicon double-clicking but not for clicking inside window. Possible solution: send TAKE_FOCUS to clicked window and then pass click to window. Solution: [NSWindow makeKeyAndOrderFront:] calls [NSApp unhide:] without check if app is hidden.
- Target application
- all windows of application ordered to front of other apps’ windows
- main menu appeared
- key window becomes focused (WApplication->last_focused)
- Source application
- key window titlebar becomes gray
- main menu disappeared
- Click on NOT docked app icon
- processEvent: - XGServerEvent.m
- handleButtonPress() - event.c
- appIconMouseDown() - appicon.c
- iconDblClick() - appicon.c
- wUnhideApplication() - actions.c
- iconDblClick() - appicon.c
- appIconMouseDown() - appicon.c
- handleButtonPress() - event.c
- processEvent: - XGServerEvent.m
- Click on docked app icon
- processEvent: - XGServerEvent.m
- handleButtonPress() - event.c
- iconMouseDown() - dock.c
- iconDblClick() - dock.c
- wUnhideApplication() - actions.c
- iconDblClick() - dock.c
- iconMouseDown() - dock.c
- handleButtonPress() - event.c
- processEvent: - XGServerEvent.m
Events: application start, windows creation, Open/Save dialogs, alert panels.
- opened window/panel becomes focused
- main menu appears
- handleMapRequest() - event.c
- wManageWindow - window.c
- wSetFocusTo() - actions.c
- wWindowFocus() - window.c
- wWindowUnfocus() - window.c
- wSetFocusTo() - actions.c
- wManageWindow - window.c
- While other app window exists
- next app window becomes focused
- Last window
- GNUstep: main menu receives input focus
- X11: previously focused window of other application becomes focused
- Closed by WM (titlebbar “Close”/”Kill” button click);
- handleButtonPress() - event.c
- buttonMouseDown() - framewin.c
- windowCloseClick() - window.c
- wClientSendProtocol() - window.c [sends DELETE_WINDOW atom to client window]
- windowCloseClick() - window.c
- buttonMouseDown() - framewin.c
- handleButtonPress() - event.c
- Closed by application (user selects menu item, use keyboard shortcuts, main menu and panels hiding).
- handleUnmapNotify() - event.c
- wUnmanageWindow() - window.c
- handleUnmapNotify() - event.c
- For X11 applications: previously focused window becomes focused even if other app windows exist. Should focus next application window.
- GNUstep appicon
- main menu appears without focus switch, app activation or unhiding.
- X11 appicon
- Short menu (“Launch”, “Bring Here”, “Hide”, “Kill”) appears with app’s name in the title. No focus switch, app activation or unhiding.
- GNUstep appicon
- X11 appicon
- handleButtonPress() - event.c
- Hidden GNUstep application activates with blacked “Hide” menu item.
The same as in “Window/panel close” test
- For X11 applications: previously focused window becomes focused even if other app windows exist. Should focus next application window.
- all windows are unmapped
- previously focused window of other application becomes focused
- Key press (Cmd-h)
- handleKeyPress() - event.c
- [GNUstep] XSendEvent(KeyPressMask)
- [X11] wHideApplication() - actions.c
- handleKeyPress() - event.c
- Left titlebar button right-click
- windowIconifyClick() - window.c
- [GNUstep] wClientSendProtocol(w_global.atom.gnustep.wm_hide_app)
- [X11] wHideApplication() - actions.c
- windowIconifyClick() - window.c
- “Hide” menu item
- hideApplication: - XGServerWindow.m
- _sendRoot::::::: - XGServerWindow.m
- XSendEvent() _WINDOWMAKER_WM_FUNCTION_ATOM, WMFHideApplication
- _sendRoot::::::: - XGServerWindow.m
- handleClientMessage() - event.c
- wHideApplication() - actions.c
- hideApplication: - XGServerWindow.m
Identical to “Appicon double-click”
- Previously active app has opened window
- Previously active app has minimized window
- Previously active app is menu-only
- handleDestroyNotify() - event.c [?]
- wApplicationDestroy() - application.c
Copyright (c) Sergii Stoian