2005-02-20 Elijah Newren <newren@gmail.com>
* src/window.c: (meta_window_activate): when receiving a
_NET_ACTIVE_WINDOW message, switch to the desktop where the window
is located before activating instead of moving the window to the
current desktop. Thanks to Lubos Lunak for catching this issue.
Fixes#128380.
2005-02-20 Elijah Newren <newren@gmail.com>
* src/window.c (meta_window_show): Ignore all focus and
focus-stealing-prevention code in meta_window_show when not
showing the window for the first time. Fixes#167199.
2005-02-20 Elijah Newren <newren@gmail.com>
Fix an obscure xinerama placement bug with windows that are too
large to fit in the workarea in both dimensions. #166757
* src/place.c: (meta_window_place): use the current xinerama
instead of arbitrarily resetting to 0
2005-02-20 Elijah Newren <newren@gmail.com>
Patch from Joe Marcus Clarke to fix a possible crash on logout.
#167935. Thanks for fixing my mistakes, Joe!
* src/display.c: (meta_display_open): initialize
display->grab_old_window_stacking to NULL.
2005-02-20 Elijah Newren <newren@gmail.com>
Big patch to cover about 6 different issues in order to correct
rare problems with timestamps (make sure window selected in
tasklist actually gets focus, sanity check timestamps to avoid
rogue apps hosing the system, correct the updating of
net_wm_user_time, correctly handle timestamps of 0 when comparing
xserver timestamps for those who have had their systems up for
over 25 days or so, add some debugging information to verbose
logs, some code cleanups). Fixes all issues listed in #167358.
* src/display.h: (struct _MetaDisplay): clarify comment on
last_focus_time, introduce a new variable--last_user_time,
(XSERVER_TIME_IS_BEFORE macro): put this functionality into a
separate macro and then introduce a new macro with this name that
uses the old one but adds additional special-case checks for
timestamps that are 0, (comment to
meta_display_set_input_focus_window): add information about how
last_user_time should be used in this function
* src/display.c (santiy_check_timestamps): new function,
(meta_display_open): intialize display->last_user_time,
(meta_display_get_current_time_roundtrip): use the timestamp,
which is known to be good, in order to sanity_check_timestamps,
(event_callback): use the new meta_window_ste_user_time() function
in order to correct problems, use the timestamp of KeyPress and
ButtonPress events, which are known to be good, in order to
sanity_check_timestamps, (timestamp_too_old): new function for
common behavior of meta_display_focus_the_no_focus_window and
meta_display_set_input_focus_window, with added checking for
display->last_user_time in addition to display->last_focus_time,
(meta_display_set_input_focus_window): replace some of the code
with a call to timestamp_too_old(),
(meta_display_focus_the_no_focus_window): replace some of th ecode
with a call to timestamp_too_old()
* src/window.h: (meta_window_set_user_time): new function to
abstract the many things that need to be done when updating the
net_wm_user_time of any window
* src/window.c: (meta_window_activate): add debugging spew, make
sure the comparison is made with last_user_time NOT
last_focus_time, use meta_window_set_user_time() function in order
to correct problems, (meta_window_client_message): add a newline
to a debugging message to make them easier to read,
(meta_window_set_user_time): new function
* src/window-props.c (reload_net_wm_user_time): use the new
meta_window_ste_user_time() function in order to correct problems
2005-02-16 Elijah Newren <newren@gmail.com>
* src/display.c: (event_callback): trivial fix to a log message:
change %d to %lu (see debugging log from bug 167358).
2005-02-12 Elijah Newren <newren@gmail.com>
Raise the ancestor of a window instead of the window itself.
Fixes#166894.
* src/window.c: (find_root_ancestor): new function,
(meta_window_raise): get the ancestor of the given window and
raise it if possible instead of the window
2005-02-12 Elijah Newren <newren@gmail.com>
Don't unconditionally place splashscreens (and other
not-to-befocused windows) below the focus window. Fixes#167042.
* src/window.c: (intervening_user_event_occurred): new function
taken from the timestamp comparison portion of the old
window_takes_focus_on_map function, (window_state_on_map): new
function with remainder of old window_takes_focus_on_map function
that determines both whether the window will take focus and
whether it should be placed on top, (meta_window_show): use
place_on_top_on_map to determine window stacking instead of trying
to infer it from takes_focus_on_map
2005-02-11 Elijah Newren <newren@gmail.com>
Avoid new windows being obscured by the focus window (and thus
possibly lost). Fixes#166524.
* src/place.c: new MetaWindowDirection enum,
(find_most_freespace): new function to find where there is the
most space available around the focused window,
(meta_window_place): if a window is denied focus and the window
overlaps the focused window, retry the first-fit algorithm only
paying attention to the focus window position and if that fails
just find the location on the screen with the most space
available.
* src/window.h: (struct MetaWindow): new
denied_focus_and_not_transient bitfield
* src/window.c: (meta_window_new_with_attrs): initialize
denied_focus_and_not_transient, (meta_window_show): set and unset
the denied_focus_and_not_transient field appropriately
2005-02-08 Aidan Delaney <adelaney@cs.may.ie>
Removed useless function call. #166730
* src/tabpopup.c: (outline_window_expose): Removed unused
references to variables and an unnecessary function call to
gdk_window_get_size().
2005-02-08 Elijah Newren <newren@gmail.com>
Avoid using CurrentTime when focusing, handle it better in case we
miss any cases. Fixes#166732.
* src/window.c: (meta_window_shade): use
meta_display_get_current_time_roundtrip() to ensure we have a
valid timestamp, (meta_window_unshade): same
* src/display.c: (meta_display_set_input_focus_window): If
CurrentTime was passed, get one from the XServer in addition to
throwing a warning, (meta_display_focus_the_no_focus_window): same
2005-02-08 Elijah Newren <newren@gmail.com>
* src/window.c: (meta_window_activate): If we're not passed a
timestamp, make sure to manually get one. Fixes#166728.
2005-02-06 Elijah Newren <newren@gmail.com>
Set a _METACITY_VERSION property (a utf8 string) on the WM check
window. #165350.
* src/display.h: (struct MetaDisplay): add a atom_metacity_version
field
* src/display.c: (meta_display_open): initialize the
_METACITY_VERSION property on the WM check window to the current
version of Metacity.
2005-02-06 Elijah Newren <newren@gmail.com>
Ignore xconfigurerequest events for stacking when it should be
safe to do so. Again, thanks to Crispin Flowerday for the test
case. Thanks to KWin for the inspiration (and to Google for
indexing their source code). Fixes the other half of #166395.
* src/window.c: (meta_window_configure_request): if the
active_window is from a separate application than the one getting
the configure request and the net_wm_user_time of the active
window is later than that of the window getting the configure
request, then ignore the request.
2005-02-06 Elijah Newren <newren@gmail.com>
If activation requests are too old, set the demands_attention hint
instead of actually activating. Thanks to Crispin Flowerday for
the test case and for testing the patch. Fixes half of #166395.
* src/window.c: (meta_window_activate): if the request came before
the last focus time, set the demands attention hint instead
2005-02-04 Dave Ahlswede <mightyquinn@letterboxes.org>
* src/metacity.schemas.in: Add period to the end of
reduced_resources' description. Fixes#165780.
2005-02-04 Elijah Newren <newren@gmail.com>
Make sure window->border_only is initialized so we don't get
random windows without decorations. Thanks to Sinisa Segvic and
Owen Taylor for providing test cases. Fixes#145131.
* src/window.c: (update_mwm_hints): Be sure to call
recalc_window_features even if no MWM hints are set
2005-02-02 Elijah Newren <newren@gmail.com>
Focus parents of dismissed transient windows in preference to the
window that most recently had keyboard focus. Fixes#157360.
* doc/how-to-get-focus-right.txt: Note the distinction between
"most recently used window" and "most recent to have keyboard
focus" that we are now making.
* src/workspace.c: (focus_ancestor_or_mru_window): rename from
meta_workspace_focus_mru_window, and first check whether we need
to focus an ancestor window before looking for the mru window,
(record_ancestor): helper function for
focus_ancestor_or_mru_window,
(meta_workspace_focus_default_window): update due to the function
rename from meta_workspace_focus_mru_window to
focus_ancestor_or_mru_window