2005-01-25 Balamurali Viswanathan <balamurali.viswanathan@wipro.com>
* src/prefs.c (meta_prefs_init): Get gconf to load the
terminal dir so that we get the notifications when
the command is changed. Fixes bug #160934
2005-01-25 Elijah Newren <newren@gmail.com>
Refuse to focus a window with a modal transient, and focus the
transient instead. Fixes#164716.
* src/window.c: (get_modal_transient): new function,
(meta_window_focus): if the window has a modal transient, make
sure it is on the current workspace and then focus it instead.
2005-01-24 Elijah Newren <newren@gmail.com>
* src/display.c: (meta_display_begin_grab_op): don't forget to
initialize display->grab_old_window_stacking. Thanks to Sebastien
Bacher and the bleeding edge Ubuntu users for catching the
occasional crash this could cause so quickly, and for verifying
that the patch worked (I couldn't duplicate). Fixes#165093.
2005-01-23 Elijah Newren <newren@gmail.com>
Restore original stacking when aborting an alt-esc window switch
operation. Fixes#123576.
* src/display.c: (GRAB_OP_IS_WINDOW_SWITCH): new macro,
(meta_display_close): clear grab_old_window_stacking if non-NULL,
(event_callback): restore stack positions if alt-esc op cancelled
with button press, (meta_display_begin_grab_op): store the old
stacking positions, (meta_display_end_grab_op): free the old stack
positions
* src/display.h: (struct _MetaDisplay): add a
grab_old_window_stacking list
* src/keybindings.c: (process_tab_grab): restore stack positions
if alt-esc op cancelled with an errant key press
* src/stack.c: (compare_just_window_stack_position): new
GCompareFunc function, (meta_stack_get_positions): get current
stack positions, (compare_pointers): new GCompareFunc function,
(lists_contain_same_windows): simple utility func to see if two
lists contains the same windows, (meta_stack_set_positions): new
function to set the positions of all the windows in the stack
* src/stack.h: (meta_stack_get_postions,
meta_stack_set_positions): new functions
2005-01-23 Elijah Newren <newren@gmail.com>
Patch from John Paul Wallington to fix#163420.
* src/window.c: (check_maximize_to_work_area): fix vertical
maximization for second screen
2005-01-20 Elijah Newren <newren@gmail.com>
* src/tabpopup.c (dimm_icon): use pixbuf, not dimmed_pixbuf (which
isn't defined yet). Fixes crash from #136666.
2005-01-20 Vincent Noel <vnoel@cox.net>
* src/screen.c: (meta_screen_ensure_tab_popup),
(meta_screen_ensure_workspace_popup):
* src/tabpopup.c: (meta_ui_tab_popup_new), (display_entry):
* src/tabpopup.h: Show labels in bold for windows that demand
attention. Fixes#164590.
2005-01-18 Vincent Noel <vnoel@cox.net>
* src/screen.c: (meta_screen_ensure_tab_popup),
(meta_screen_ensure_workspace_popup):
* src/tabpopup.c: (dimm_icon), (meta_ui_tab_popup_new),
(free_entry):
* src/tabpopup.h: In the tab task switcher popup, dim the window
icon and put its name between brackets when the window is
minimized. Fixes#136666.
2005-01-11 Elijah Newren <newren@gmail.com>
Correct highlighting of windows in workspace switcher popup.
Fixes#163450.
* src/tabpopup.c (meta_select_workspace_expose_event): Remove race
between FocusIn/FocusOut events and the expose event by replacing
window->has_focus with
window==window->display->expected_focus_window.
2005-01-09 Elijah Newren <newren@gmail.com>
Don't focus the panel on click. Fixes#160470 (and 100470 and
removes the need for the hack from 128200)
* doc/how-to-get-focus-right.txt: Update section on focusing
non-decorated windows (specifically, DOCKS and DESKTOPS)
* src/display.c (event_callback): don't focus dock windows on
click
2005-01-06 Elijah Newren <newren@gmail.com>
Make sure the save session dialog appears focused. Fixes#162983.
* src/session.c (warn_about_lame_clients_and_finish_inter): Get a
timestamp by explicit request from Xserver, since none is
available otherwise.
2004-12-28 Elijah Newren <newren@gmail.com>
Allow users to move the window around immediately after
double-clicking to shade (#90290)
* src/display.c (event_callback): only end the grab op if either
there is no frame or else the frame is not mapped
2004-12-27 Elijah Newren <newren@gmail.com>
Focus windows that manually position themselves too (fixes
#107347).
* src/window.h (struct _MetaWindow): add a new
showing_for_first_time flag
* src/window.c (meta_window_new_with_attrs): initialize
showing_for_first_time flag to !mapped, (meta_window_show):
replace did_placement with showing_for_first_time in the section
to decided whether to focus since did_placement isn't quite what
we want
2004-12-27 Elijah Newren <newren@gmail.com>
* src/display.c (meta_display_set_input_focus_window,
meta_display_focus_the_no_focus_window): Spew warning if
CurrentTime is passed to the function, but don't exit prematurely.
(fixes#162353)
2004-12-24 Elijah Newren <newren@gmail.com>
* src/window.c (window_takes_focus_on_map): Fix error in
distinguishing < vs. <= introduced by the patch in #154598,
restructure code so that verbose log matches code better in order
ensure such mistakes are harder to make in the future (fixes
#162172)
2004-12-24 Elijah Newren <newren@gmail.com>
Thanks to mild7@users.sourceforge.net for this fix.
* src/window.h: (META_WINDOW_IN_NORMAL_TAB_CHAIN): Excludes
windows with skip_taskbar hint set from the alt-tab list; they'll
appear in the ctrl-alt-tab list instead. (fixes#106249)
2004-12-22 Elijah Newren <newren@gmail.com>
Wrap XSetInputFocus, making display->expected_focus_window a
little more reliable (see #154598)
* src/display.h: (struct _MetaDisplay): add a large comment about
the expected_focus_window, add a last_focus_time field,
(XSERVER_TIME_IS_BEFORE): new macro moved from window.c but fixed
for 64-bit systems, (meta_display_set_input_focus_window): new
function
* src/display.c (meta_display_open): initialize last_focus_time,
add a comment about brokenness of trying to set intial focus
window, (meta_display_set_input_focus_window): new function that
wraps XSetInputFocus,
(meta_display_focus_the_no_focus_window): make this function
closer to a wrapping of XSetInputFocus for the no_focus_window.
* src/window.c (XSERVER_TIME_IS_LATER): remove this macro in favor
of the improved one added to display.h
* src/display.c (meta_display_open):
* src/window.c (meta_window_focus):
use meta_display_focus_the_no_focus_window and
meta_display_set_input_focus instead of XSetInputFocus
2004-12-22 Elijah Newren <newren@gmail.com>
Partially resolve the conflicting requirements of windows on
multiple workspaces and hidden being a global quantity for windows
(fixes bug 156182; the remainder of the work is bug 87531 and is a
libwnck issue)
* src/display.c (event_callback):
* src/window.c (meta_window_visible_on_workspace, meta_window_unstick):
* src/workspace.c (meta_workspace_add_window,
meta_workspace_contains_window,
meta_workspace_queue_calc_showing):
* src/workspace.h:
Remove meta_workspace_contains_window, replace with simple
comparison utilizing window->workspace
* src/place.c (meta_window_place):
* src/window.c (meta_window_shares_some_workspace):
* src/window.h:
Remove meta_window_shares_some_workspace, replace with a simple
comparison utilizing window->workspace
* src/session.c (save_state),
* src/window.c (meta_window_new_with_attrs,
meta_window_apply_session_info, meta_window_free,
window_showing_on_its_workspace,
meta_window_change_workspace_without_transients,
meta_window_unstick, meta_window_set_current_workspace_hint,
meta_window_get_workspaces):
* src/window.h:
* src/workspace.c (meta_workspace_free, meta_workspace_add_window,
meta_workspace_remove_window):
Only one workspace now
2004-12-19 Elijah Newren <newren@gmail.com>
Thanks to Baptiste Mille-Mathias for this fix.
* src/metacity.schemas.in: Add a missing period at the end of a
sentence.
2004-12-19 Elijah Newren <newren@gmail.com>
When snap-moving, don't snap to transients of minimized windows
since they are hidden. Fixes#157180
* src/place.c (get_windows_on_same_workspace): make the logic to
determine hidden windows more thorough by calling
meta_window_should_be_showing()
* src/window.c (meta_window_should_be_showing): rename this
function from window_should_be_showing and also export it,
(implement_showing):
s/window_should_be_showing/meta_window_should_be_showing/,
(idle_calc_showing):
s/window_should_be_showing/meta_window_should_be_showing/
* src/window.h (meta_window_should_be_showing): Add this function
to the list so that it can be used in src/place.c
2004-12-19 Elijah Newren <newren@gmail.com>
Focus the desktop when showing it. Fixes#159257.
* src/display.c (event_callback): obtain a timestamp to pass to
meta_screen_show_desktop
* src/keybindings.c (handle_toggle_desktop): obtain a timestamp to
pass to meta_screen_show_desktop
* src/screen.c (meta_screen_show_desktop): add a timestamp
parameter, get the most recently used window of type DESKTOP (if
there is one) and focus it
* src/screen.h (meta_screen_show_desktop): add a timestamp
parameter
2004-11-10 James Henstridge <james@jamesh.id.au>
* Makefile.am (DISTCLEANFILES): remove intltool stuff on distclean.
* src/themes/Makefile.am (uninstall-local): add uninstall rule.
* src/Makefile.am (libmetacity_private_la_CFLAGS): set this
variable so that the files shared with metacity get compiled with
different names.
* configure.in: use more modern macros in some places, and make
sure that $ACLOCAL_AMFLAGS is set so that rebuilds work better.
* autogen.sh (conf_flags): use newer automake.
2004-10-25 Elijah Newren <newren@math.utah.edu>
Don't lower newly mapped windows when they're denied focus, if
they are transients of the focused window. Instead, defocus the
currently focused window. (fixes#151996).
(Also, reenable focus stealing prevention and do a small spacing
cleanup)
* src/window-props.c (init_net_startup_id): fix spacing
* src/window.c (window_takes_focus_on_map): re-enable focus
stealing prevention, (meta_window_show): if the new window is
denied focus and is a transient of the currently focused window,
defocus the currently focused window but keep the transient on
top; remove some old code about transients and focus; make sure
that EnterNotify events won't accidentally focus the new window.
2004-10-25 Elijah Newren <newren@math.utah.edu>
Fix the alt-tab order--if the most recently used window is not
focused, start alt tabbing with that window instead of the one
after it (fixes#156251)
* src/display.c (find_tab_forward): add a skip_first parameter,
(find_tab_backward): add a skip_last parameter,
(meta_display_get_tab_next): if a beginning window wasn't given
and the focused window isn't the tab chain, don't skip the MRU
window
2004-10-22 Elijah Newren <newren@math.utah.edu>
Update _NET_WM_STATE_HIDDEN so the pager on the panel will know
whether to display windows as visible or hidden (#105665)
* src/screen.c (queue_windows_showing): Revert the
queue_windows_showing portion of the patch committed on 2004-10-16
for #142198--it was an ill-advised optimization.
* src/window.c (window_showing_on_its_workspace,
window_should_be_showing): split the old window_should_be_showing
into these two functions, (set_net_wm_state): hidden state is more
complex; use window_showing_on_its_workspace to determine the
correct value
2004-10-20 Elijah Newren <newren@math.utah.edu>
Patch from Soeren to fix the modifier key breakage introduced by
an Xorg change. (fixes#151554)
* src/keybindings.c: include X11/XKBlib.h if available,
(handle_spew_mark): remove this unused function declaration,
(end_keyboard_grab): new function, uses XKB if available,
(process_tab_grab): use end_keyboard_grab to determine whether to
end the grab, (error_on_command): make key a const char *,
(process_workspace_switch_grab): use end_keyboard_grab to
determine whether to end the grab
2004-10-19 Anders Carlsson <andersca@gnome.org>
* src/frame.c: (meta_window_ensure_frame):
Don't try to use an ARGB visual at all if the depth isn't
32-bit. This caused major slowdowns with Composite enabled.
2004-10-16 Elijah Newren <newren@math.utah.edu>
Make the "showing desktop" mode be per-workspace instead of
per-screen. (fixes#142198)
* src/keybindings.c (handle_toggle_desktop): access
showing_desktop through the active workspace
* src/screen.c (meta_screen_new): remove initialization of
screen->showing_desktop,
(meta_screen_update_showing_desktop_hint): rename and make not
static and access showing_desktop through the active workspace,
(queue_windows_showing): replace meta_display_list_windows() with
screen->active_workspace->windows,
(meta_screen_minimize_all_on_active_workspace_except): renamed
from meta_screen_minimize_all_except since it now only works on
the active workspace, (meta_screen_show_desktop,
meta_screen_unshow_desktop): access showing_desktop through the
active workspace
* src/screen.h (struct _MetaScreen): remove showing_desktop field,
(meta_screen_minimize_all_on_active_workspace_except): rename from
meta_screen_minimize_all_except,
(meta_screen_update)_showing_desktop_hint): export this function too
* src/window.c (maybe_leave_show_desktop_mode): access
showing_desktop through the active workspace and use new name for
meta_screen_minimize_all_on_active_workspace_except,
(window_should_be_showing): access showing_desktop through the
active workspace
* src/workspace.c (meta_workspace_new): initialize
workspace->showing_desktop, (meta_workspace_activate_with_focus):
add note that old can be NULL, update showing_desktop_hint if
different on this workspace than the previous one
* src/workspace.h (struct _MetaWorkspace): add showing_desktop
field
2004-10-13 Elijah Newren <newren@math.utah.edu>
Code cleanup
* src/window.c (is_in_dock_group, docks_at_end_cmp,
shuffle_docks_to_end): removed functions,
(meta_window_notify_focus): no need to call is_in_dock_group or
shuffle_docks_to_end because of the patch from #120100 that was
committed.
2004-10-13 Vincent Untz <vincent@vuntz.net>
Add a keybinding to launch a terminal
* src/keybindings.c: (handle_run_terminal): new function,
(error_on_generic_command): new function, (error_on_command): wrapper
around error_on_generic_command(), (error_on_terminal_command): new
function
* src/metacity.schemas.in: add run_command_terminal key
* src/prefs.[ch]: (meta_prefs_init): cache the terminal command and
register a gconf callback to update it, (change_notify): handle the
notification of terminal command changes, (meta_preference_to_string):
add the terminal command case, (update_terminal_command): new function,
(meta_prefs_get_terminal_command): new function,
(meta_prefs_get_gconf_key_for_terminal_command): new function
2004-10-08 Elijah Newren <newren@math.utah.edu>
Fix middle-frame-click-to-lower focus inconsistency (#154601)
* src/core.c (meta_core_user_lower_and_unfocus): focus the default
window in all focus modes, not just click-to-focus (EnterNotify
events will not handle this case for sloppy and mouse focus)
* src/display.c (event_callback): replace window->has_focus with
window == display->expected_focus_window to avoid a race issue
2004-10-08 Elijah Newren <newren@math.utah.edu>
Alter the meaning of expected_focus_window; doesn't affect
current operation but assists in fixing some other bugs
(#154598)
* src/display.c (meta_display_focus_the_no_focus_window): set the
expected_focus_window to NULL.
* src/window.c (meta_window_notify_focus): don't NULL the
expected_focus_window when that window receives a FocusIn event
2004-10-04 Elijah Newren <newren@math.utah.edu>
* src/display.c (event_callback): if the root window gets focused,
set the focus to the default window; this fixes the
"focus-follows-mouse" behavior seen for click-to-focus mode after
cancelling log out (fixes#153220)
2004-10-04 Elijah Newren <newren@math.utah.edu>
Fix a variety of issues with autoraise (#134206)
* src/display.h: (struct _MetaDisplay): add an autoraise_window
parameter
* src/display.[hc] (meta_display_focus_the_no_focus_window): new
function, (meta_display_queue_autoraise_callback): new function,
(meta_display_remove_autoraise_callback): new function
* src/display.c (meta_display_open): intialize
display->autoraise_window too, (meta_display_close): remove any
pending autoraise callback, (window_raise_with_delay_callback):
clear out auto_raise->display->autoraise_window too,
(event_callback): call meta_display_queue_autoraise_callback
instead of having the code inline, call
meta_display_focus_the_no_focus_window to handle focusing that
window
* src/window.c (meta_window_focus): If there's a window with an
autoraise timeout that isn't the window being focused, remove the
autoraise timeout
* src/workspace.c (meta_workspace_focus_default_window): If no
autoraise timeout is queued for the given window then queue one
now, call meta_display_focus_the_no_focus_window to handle
focusing that window, (meta_workspace_focus_mru_window): call
meta_display_focus_the_no_focus_window to handle focusing that
window
2004-10-04 Elijah Newren <newren@math.utah.edu>
* src/display.c (event_callback): When no window becomes focused,
focus the default window instead of punting to the
no_focus_window. Also, change the warning to a verbose
message--this will happen frequently due to brain-damage in the X
protocol. (see #125492)
2004-10-04 Elijah Newren <newren@math.utah.edu>
Fix a variety of focus race conditions in all focus modes, or at
least make them harder to trigger (fixes#152000)
* src/core.[ch] (meta_core_user_lower_and_unfocus): add a
timestamp parameter; pass it along to
meta_workspace_focus_default_window
* src/display.[ch] (meta_display_get_current_time_roundtrip): new
function
* src/display.c (event_callback): pass a timestamp to the
meta_workspace_activate and meta_workspace_focus_default_window
function calls
* src/frames.c (meta_frames_button_press_event): pass a timestamp
to meta_core_user_lower_and_unfocus
* src/keybindings.c (handle_activate_workspace): pass a timestamp
to meta_workspace_activate, (process_workspace_switch_grab): pass
a timestamp to meta_workspace_focus_default_window and
meta_workspace_activate, (handle_toggle_desktop): pass a timestamp
to meta_workspace_focus_default_window,
(do_handle_move_to_workspace): pass a timestamp to
meta_workspace_activate_with_focus, (handle_workspace_switch):
meta_workspace_activate
* src/screen.c (meta_screen_new): pass a timestamp to
meta_workspace_activate
* src/window.c (meta_window_free): pass a timestamp to
meta_workspace_focus_default_window, (idle_calc_showing): don't
increment the focus sentinel here, (meta_window_minimize): pass a
timestamp to meta_workspace_focus_default_window,
(meta_window_client_message), pass a timestamp to
meta_workspace_focus_default_window
* src/workspace.h (meta_workspace_activate): add timestamp
parameter, (meta_workspace_activate_with_focus): add timestamp
parameter, (meta_workspace_focus_default_window): add timestamp
parameter
* src/workspace.c (meta_workspace_focus_mru_window): make this
function take a timestamp and use it for meta_window_focus or
XSetInputFocus, (meta_workspace_activate_with_focus): make this
function take a timestamp and pass it along to meta_window_focus
and meta_workspace_focus_default_window,
(meta_workspace_activate): make this function take a timestamp and
pass it to meta_workspace_activate_with_focus),
(meta_workspace_focus_default_window): make this function take a
timestamp, warn if its 0 but try to handle that case sanely, and
pass the timestamp on to meta_window_focus or
meta_workspace_focus_mru_window or XSetInputFocus
2004-09-22 Elijah Newren <newren@math.utah.edu>
* src/keybindings.c (process_workspace_switch_grab): Focus the
default window after the user dismisses the workspace switcher
popup (fixes#123803; note that an alternate fix was made
independently by David Baron for sloppy and mouse focus users)