2006-09-13 Elijah Newren <newren gmail com>
* src/window.c (meta_window_show): Patch from Thomas Andersen to
make windows be stacked correctly before showing them, to prevent
flicker with focus stealing prevention. #332385.
2006-08-21 Elijah Newren <newren gmail com>
Fix several bugs with handling of fullscreen windows, causing them
to not actually be fullscreen. #343115 (and also #346927,
#350547, #351643, the recent additional WINE-related issue
mentioned on the mailing list, and probably others...)
* src/constraints.c (setup_constraint_info): if a window tries to
resize to fullscreen-size and it has a fullscreen function but
isn't actually marked as fullscreen then assist it by marking it
as such, (constrain_fully_onscreen, constrain_titlebar_visible):
ignore this constraint for fullscreen windows since such windows
have a separate specialized constraint
* src/stack.c (window_is_fullscreen_size, get_standalone_layer):
remove the old window_is_fullscreen_size() hack for detecting
windows to treat as fullscreen since it doesn't work well with the
new constraints framework (i.e. we needed a slightly different
hack)
* src/window.[ch] (meta_window_new_with_addrs): shuffle the order
of adding the window to the stack and moveresizing the window
since moveresizing can cause stack changes if the window's initial
size is fullscreen size, (meta_window_make_fullscreen,
meta_window_make_fullscreen_internal): split
meta_window_make_fullscreen() similar to meta_window_maximize() so
that constraints can make use of it
2006-08-07 Elijah Newren <newren gmail com>
* src/window.c (intervening_user_event_occurred): Vytautus Liuolia
totally rocks; he tested and debugged and tracked down where we
were using the focus window's net_wm_user_time even when it was
uninitialized. This may fix bug 311868 and others I've heard
about (with Valknut, IIRC). It definitely fixes the issues Vytas
was seeing with his single instance library. :-)
2006-08-07 Elijah Newren <newren gmail com>
Add a constrain_titlebar_visible constraint; should fix both bug
333328 and bug 345522. Not perfect (minor annoying snap pulling
windows back onscreen, plus an ugly hack almost as bad as the old
one), but tarballs are due in less than half an hour. ;-)
* src/boxes.[ch] (meta_rectangle_overlaps_with_region):
new function
* src/constraints.c (constrain_titlebar_visible): new function,
(enum ConstraintPriority, array all_constraints,
update_onscreen_requirements): various small changes to
accomodate the new function
* src/edge-resistance.c: remove the infinite edge resistance,
which was a big hack of a way to workaround the lack of a
titlebar_visible constraint
* src/window.[ch] (MetaWindow): new require_titlebar_visible
bitfield, (meta_window_new_with_attrs): initialized here
2006-08-07 Elijah Newren <newren gmail com>
Patch from Vytautas Liuolia to react to _NET_STARTUP_ID changes,
as proposed for the new startup-notification/EWMH spec. #347515
* src/window-props.c (reload_net_startup_id): be sure to act on
the new id instead of just recording it
* src/window.[ch] (window_activate, meta_window_activate,
meta_window_activate_with_workspace, meta_window_client_message):
change window_activate() to take a workspace parameter instead of
hardcoding to the current workspace, add
meta_window_activate_with_workspace() function needed by
reload_net_startup_id().
2006-08-04 Elijah Newren <newren gmail com>
Patch from Dmitry Timoshkov to fix the heuristic for determining
if windows can be made fullscreen (needed for WINE and possible
also some legacy applications). Part of #346927.
* src/window.c (recalc_window_features): ignore window decoration
when checking size for determing whether an unresizable window
should be allowed ot be considered for fullscreening
Fri May 26 16:48:29 2006 Søren Sandmann <sandmann@redhat.com>
* src/effects.c (meta_effect_run_unminimize): Run an unminimize effect
* src/window.c (meta_window_unminimize): Store a "was_minimized"
boolean in the window.
* src/window.c (meta_window_show): If the window was minimized,
run an unminimize animation.
* src/c-window.c (meta_comp_window_run_unminimize): Add an
unminimize animation, running the minimize one in reverse.
Mon May 22 17:35:52 2006 Søren Sandmann <sandmann@redhat.com>
* src/effects.[ch]: Beginning of new layer that abstracts
transition effects.
New functions:
(meta_push_effect_handler): Install an effect handler
(meta_pop_effect_handler): Remove last effect handler
(meta_effect_run_minimize): Create a minimize effect and pass it
to the handler.
(meta_effect_end): Called by handler when the effect is finished.
* src/compositor.c: Move explosion code form there to src/c-window.c.
* src/c-screen.c: Delete explosion related code.
2006-05-18 Björn Lindqvist <bjourne@gmail.com>
* resizepopup.c: Remove the unused attributes resize_gravity,
width_inc, height_inc, min_width, min_height, frame_left,
frame_right, frame_top, frame_bottom, tick_origin_x, tick_origin_y
from the MetaResizePopup struct. Delete all code that references
those attributes.
2006-04-25 Elijah Newren <newren gmail com>
Clear _NET_WM_VISIBLE_NAME (and the ICON_ equivalent) when no
longer being used. Fixes#330671.
* src/window.[ch] (struct MetaWindow): new
using_net_wm_visible_name and using_net_wm_visible_icon_name bits,
(meta_window_new_with_attrs): initialize these new bits to false
* src/window-props.c (set_title_text, set_window_title, set_icon_title):
if the _NET_WM_VISIBLE_(ICON_)NAME property was previously set but
doesn't need to be this time, make sure to clear it
2006-04-16 Elijah Newren <newren gmail com>
Patch from Dan Sanders to fix#334899.
* window.c (meta_window_new_with_attrs): Unminimize ancestors of
new windows when mapped; this prevents e.g. confirmation windows
from causing applications to appear locked when closing via the
window list.
2006-04-15 Elijah Newren <newren gmail com>
Patch from Dan Sanders to fix#335076.
* src/core.c (meta_core_maximize, meta_core_toggle_maximize,
meta_core_unmaximize):
* src/window.c (meta_window_client_message):
Raise windows on maximize/unmaximize.
2006-04-12 Elijah Newren <newren gmail com>
Patch from Ron Yorston to add a focus_new_windows option. Default
is 'smart' (focus by default but normal focus-stealing-prevention
can kick in); 'strict' is current other choice (like 'smart'
except that programs launched by the terminal will not be
focused). Fixes remainder of #326159. Should also close#152004
and a bunch of others.
* src/common.h:
Add a MetaFocusNewWindows enum giving the current types allowed
* src/display.h:
Update docs on allow_terminal_deactivation to note that it is only
relevant when focus_new_windows is 'strict'
* src/prefs.c:
* src/prefs.h:
* src/metacity.schemas.in: add the new gconf key and explanation
* src/prefs.[ch] (#define KEY_FOCUS_NEW_WINDOWS, static gboolean
focus_new_windows, update_focus_new_windows, meta_prefs_init,
change_notify, meta_prefs_get_focus_new_windows,
meta_preference_to_string):
Add all the normal preference handling stuff for this new
focus-new-windows option.
* src/window.c (window_state_on_map, meta_window_set_user_time):
Don't focus windows launched from a terminal
Mon Apr 10 16:44:51 2006 Søren Sandmann <sandmann@redhat.com>
* src/c-screen.c (is_menu): Check if the window is a menu and make
it 90% opaque in that case.
* src/c-screen.c (claim_selection): Handle CM_Sn selection
properly.
* src/c-screen.c: Remove debug spew
* src/screen.c (meta_screen_composite_all_windows): Remove debug spew
2006-03-29 Elijah Newren <newren gmail com>
Fix grouping in the presence of ancestors; caught by Björn.
#336184
* src/group.c (meta_window_compute_group): Use new
meta_window_find_root_ancestor() function to get ancestor; for the
computed group, use the ancestor's group instead of the ancestor
itself
* src/window.[ch] (meta_window_find_root_ancestor,
meta_window_raise): split meta_window_find_root_ancestor()
functionality of meta_window_raise() and make it available
elsewhere
2006-03-29 Thomas Thurman <thomas@thurman.org.uk>
* src/window.c, src/window.h (meta_window_set_demands_attention,
meta_window_unset_demands_attention): mark a window as needing
or not needing the user's attention
* src/window.c (meta_window_show, window_activate,
meta_window_focus, meta_window_configure_request,
meta_window_client_message): use the new set/unset
demands attention functions. Fixes#305822.
2006-03-25 Thomas Thurman <thomas@thurman.org.uk>
* src/window.c, src/window.h (update_net_wm_state,
update_mwm_hints, update_wm_class, update_transient_for):
deleted and moved into window-props.c
(meta_window_new_with_attrs): added constructing field
and four new initial properties (as above)
(meta_window_recalc_features,
meta_window_recalc_window_type): new functions
* src/window-props.c (init_net_wm_state, reload_net_wm_state
init_mwm_hints, reload_mwm_hints, init_wm_class,
reload_mwm_class, init_transient_for, reload_transient_for):
new functions, moved in from window.c
(meta_display_init_window_prop_hooks): initialise new properties
2006-03-03 Thomas Thurman <thomas@thurman.org.uk>
Always set _NET_WM_STATE when a window is shown or
hidden, even if it wasn't mapped.
* src/window.c (meta_window_hide, meta_window_show):
call set_net_wm_state unconditionally
Wed Mar 15 16:30:09 2006 Søren Sandmann <sandmann@redhat.com>
* src/compositor.c (set_geometry): Use set_target_rect() instead
of set_size().
* src/c-screen.c: Add set_target_rect() as a way of scaling windows.
* src/window.c (meta_window_handle_mouse_grab_op_event): Turn
updates on after a button release.
* src/window.c (meta_window_move_resize_internal): Fix
indentation.
Tue Mar 14 11:57:46 2006 Søren Sandmann <sandmann@redhat.com>
* src/compositor.c: Comment out wobbling
* src/compositor.c (blow_up): remove this function
* src/compositor.c (process_configure_notify): Uncomment
set_size().
* src/c-screen.c (meta_screen_info_set_updates): When updates are
true, set all the properties such as size and shape.
* src/c-screen.c (meta_screen_info_add_window): Create a special
WindowInfo structure for each window.
* src/c-screen.c (meta_screen_info_set_size): Set size and output
shape of the drawable node.
2006-03-06 Ryan Lortie <desrt@desrt.ca>
* src/window.c (meta_window_free): Only unmaximise window before
freeing if the window is actually maximised. #333563.
Wed Mar 3 13:25:03 2006 Søren Sandmann <sandmann@redhat.com>
* src/compositor.c, src/c-screen.[ch]: Split the ScreenInfo data
structure into separate, new files c-screen.[ch].
* src/errors.c (x_error_handler): Forward foreign errors to
foreign displays.
* src/errors.c (meta_errors_register_foreign_display): Implement
this function
* src/errors.h: Add new meta_errors_register_foreign_display()
2006-02-27 Elijah Newren <newren gmail com>
Patch from Thomas Thurman to work around buggy application
grouping with transient windows. #328211
* src/group.c (meta_window_compute_group):
Put transients in the same group with their parent, always.
* src/window.c (update_transient_for):
Update group too
Sat Feb 25 11:46:14 2006 Søren Sandmann <sandmann@redhat.com>
* src/display.c (meta_display_begin_grab_op): Call
meta_compositor_begin_move if there is a compositor
* src/compositor.c (meta_compositor_begin/update/end_move):
Implement those functions.
* src/spring-model.[ch]: New files
Wed Feb 15 14:47:50 2006 Søren Sandmann <sandmann@redhat.com>
* src/compositor.c (meta_compositor_unminimize): Add unused wobbly
unminimize animation by Kristian
* src/compositor.c (meta_compositor_minimize): Add wobbly minimize
animation by Kristian.
* src/compositor.c: Add support for turning updates on and off.
* src/window.c (meta_window_move_resize_internal): Use
sync counter to make composited resizing tear free
2006-02-10 Thomas Thurman <thomas thurman org uk>
Avoid a memory leak when checking which workspace(s) a window is
on. Fixes#322059.
* src/workspace.h (struct MetaWorkspace):
* src/workspace.c (meta_workspace_new, meta_workspace_free):
added list_containing_self member to MetaWorkspace
* src/window.c (meta_window_get_workspaces): use
window->workspace->list_containing_self instead of allocating (and
leaking) such a list on the fly.
2006-01-20 Elijah Newren <newren gmail com>
Avoid flashing when closing a maximized window. Fixes#317254.
* src/window.c (unmaximize_window_before_freeing): new function
that just fixes the net_wm_state and sends a configure_notify,
(meta_window_free): use unmaximize_window_before_freeing() instead
of meta_window_unmaximize() to avoid flicker
2006-01-15 Elijah Newren <newren@gmail.com>
Fix accidental overzealous focus holding by the terminal
introduced by the original patch in bug 326159. Windows launched
from panel icons, the panel menu, or global keybindings should get
focus now. #326159.
* src/display.c (meta_display_open, event_callback):
* src/display.h (struct MetaDisplay):
* src/keybindings.c (process_event):
* src/window.c (meta_window_set_user_time):
Add a new allow_terminal_deactivation field to MetaDisplay and use
it to track whether the user's last action was interaction with
the terminal or some outside action (global keybinding, clicking
on a dock, etc.) likely to launch a new window.
* src/window.c (window_state_on_map):
Allow the focus switch from a terminal to something else if
allow_terminal_deactiviation is true.
* src/keybindings.c (handle_panel_keybinding):
Remove some unneeded code.
Fri Jan 13 14:40:19 2006 Søren Sandmann <sandmann@redhat.com>
* configure.in: Add a dependency on libcm when building with
compositor.
* src/window.c (meta_window_hide): Make this function static.
* src/window.c (implement_showing): Use meta_compositor_minimize()
to do a weird minimize effect.
* src/compositor.[ch]: Beginning of new GL based compositor.
* src/screen.h (struct _MetaScreen): Add void pointer to
compositor data.
* src/screen.c (meta_screen_new): Remove obsolete compositor
stuff; initialize compositor_data. Don't composite manage screen
out of this function.
* src/errors.c (x_error_handler): Check that display is non-NULL
before using it. Add comment about how that can happen.
* src/display.c (meta_display_{begin,end}_grab_op): Remove
explicity damage of windows.
* src/display.c (meta_display_open): Composite manage all the
screens.
2006-01-10 Elijah Newren <newren@gmail.com>
Add a raise on click option, basically only because all the major
distros are patching it in anyway. See #326156.
* src/metacity.schemas.in: add the new gconf key and explanation
* src/prefs.[ch] (#define KEY_RAISE_ON_CLICK, static gboolean
raise_on_click, update_raise_on_click, meta_prefs_init,
change_notify, meta_prefs_get_raise_on_click,
meta_preference_to_string):
Add all the normal preference handling stuff for this new
raise-on-click option.
* src/core.c (meta_core_show_window_menu):
* src/display.c (event_callback, meta_display_begin_grab_op):
* src/window.c (window_activate, meta_window_configure_request, ):
Only raise the window if in raise_on_click mode.
* src/display.c (meta_display_begin_grab_op,
meta_display_end_grab_op, meta_display_check_threshold_reached):
* src/display.h (struct MetaDisplay):
* src/window.c (meta_window_handle_mouse_grab_op_event):
if not in raise-on-click mode only raise on button release if the
click didn't start a move or resize operation; needs a few extra
MetaDisplay fields to handle this
* src/core.c (meta_core_user_lower_and_unfocus):
no need to do the MRU shuffling if not maintaining the stacking
order == MRU order invariant
* src/frames.c (meta_frames_button_press_event):
* src/window.c (meta_window_begin_grab_op):
remove an unneeded window raising that is already handled elsewhere
2006-01-10 Elijah Newren <newren@gmail.com>
Don't "steal" focus from terminal windows for new window mappings
as the difference in usage between terminals and other apps seems
to suggest this difference in treatment. See #326159 for details,
feedback welcome.
* src/window.[ch] (__window_is_terminal): New function, currently
an ugly hack and should be replaced by a new property set by
applications if the behavior works to our liking,
(window_state_on_map): don't transfer focus to new windows from
terminals unless the new window is a transient of the focused
terminal
* src/keybindigns.c (handle_panel_keybinding): panel run dialog
keybinding should be counted as an explicit transfer of focus to
the new window, so override the
don't-transfer-focus-from-terminals in this case
2006-01-09 Elijah Newren <newren@gmail.com>
More thorough handling of source indication. Part of #326041.
* src/window.c (window_activate): new function based off the old
meta_window_activate but which also takes source indication into
account, (meta_window_active): just call window_activate() with
the necessary source indication to get the behavior wanted,
(meta_window_client_message): check source indication too for
_net_active_window messages
* src/window.h (enum MetaClientType): convenience enum for source
indication handling
2006-01-09 Elijah Newren <newren@gmail.com>
Make the taskbar less flash happy and fix up some related stacking
issues. #326035.
* src/window.c (windows_overlap): new function,
(meta_window_show): if a window is denied focus but doesn't
overlap with the focus window there is no need to set the demands
attention hint nor stack that window below the focus window,
(meta_window_get_outer_rect): we're not modifying the window so
declare it to be const
2006-01-02 Elijah Newren <newren@gmail.com>
Patch from Björn Lindqvist to fix a logic error. #322149.
* src/window.c (update_resize): && should have been ||.
2005-12-27 Elijah Newren <newren@gmail.com>
Make the workspace switcher work with dual-head (non-xinerama)
setups. Fixes#319423.
* src/display.c (meta_display_open, event_callback,
meta_display_focus_the_no_focus_window):
* src/display.h (struct MetaDisplay,
meta_display_focus_the_no_focus_window):
* src/keybindings.c (primary_modifier_still_pressed):
* src/screen.c (meta_screen_new):
* src/screen.h (struct MetaScreen):
* src/window.c (meta_window_new_with_attrs, meta_window_show):
* src/workspace.c (meta_workspace_focus_default_window):
Replace display->no_focus_window with a no_focus_window for each
screen.
* src/display.[ch] (meta_display_xwindow_is_a_no_focus_window,
event_callback):
* src/window.c (meta_window_new_with_attrs):
New utility function, meta_display_xwindow_is_a_no_focus_window(),
for checking if the given xwindow is a no_focus_window for one of
the screens.