~muktupavels/metacity/adwaita-icon-theme-lp-1414613

« back to all changes in this revision

Viewing changes to doc/how-to-get-focus-right.txt

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-01 12:43:53 UTC
  • mto: (2.2.1 sid) (1.4.2)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.westby@ubuntu.com-20070501124353-qjwng2k8l9i1afqo
Tags: upstream-2.19.5
ImportĀ upstreamĀ versionĀ 2.19.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
   sloppy     If the mouse is in a window, then it is focused; if the
22
22
              mouse is not in a window, then the most recently used
23
23
              window is focused.
24
 
 
25
24
    mouse     If the mouse is in a non-DESKTOP window, then it is focused;
26
25
              otherwise, the designated "no_focus_window" is focused
27
26
 
36
35
              on top)
37
36
   sloppy     Focus the window containing the pointer if there is such
38
37
              a window, otherwise focus the most recently used window.
39
 
 
40
38
    mouse     Focus the non-DESKTOP window containing the pointer if
41
39
              there is one, otherwise focus the designated
42
40
              "no_focus_window".
66
64
 
67
65
To handle these cases, Metacity compares timestamps of the event that
68
66
caused the launch and the timestamp of the last interaction with the
69
 
focused window.  (Case 2 is handled by providing a special timestamp
70
 
of 0 for the launch time, which ensures that the window that appears
71
 
doesn't get focus)
 
67
focused window.  (Case 2 is handled by the application providing a
 
68
special timestamp of 0 for the launch time, which ensures that the
 
69
window that appears doesn't get focus)
72
70
 
73
71
If the newly launched window isn't focused, some things should be done
74
72
to alert the user that there is a window to work with:
88
86
this by having a mouse_mode boolean used to determine which of the two
89
87
sets of invariants holds.  This mode is set according to which method was
90
88
most recently used to choose a focus window:
91
 
  1) When receiving EnterNotify/LeaveNotify events from mouse movement, set
 
89
  1) When receiving EnterNotify events from mouse movement, set
92
90
     mouse_mode to TRUE.
93
91
  2) When using keynav to choose a focus window (e.g. alt-tab, alt-esc,
94
 
     move-window-to-workspace keybindings), set mouse_mode to FALSE.
 
92
     alt-f2, move-window-to-workspace keybindings), set mouse_mode to FALSE.
95
93
  3) When handling events that don't choose a focus window but rather need
96
94
     a focus_window chosen for them (e.g. switch-to-workspace keybindings),
97
95
     don't change the mouse_mode and just use the current value.