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()
Tue Feb 28 14:49:23 2006 Søren Sandmann <sandmann@redhat.com>
* src/compositor.c: Put the windows in a stacker rather than
do the traversing outselves.
2006-02-27 Elijah Newren <newren gmail com>
Patch from Thomas Thurman to prevent setting cycle_windows to
keybindings that won't work. #329676
* src/prefs.c (update_binding):
Make sure that bindings which require a modifier key are set to a
keybinding with one or else that the binding is reverted.
* src/ui.[ch] (meta_ui_accelerator_name):
New function
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
Thu Feb 23 15:40:52 2006 Søren Sandmann <sandmann@redhat.com>
* src/compositor.c (meta_compositor_manage_screen): Don't attempt
to manage the screen if it already is managed.
* src/compositor.c (meta_compositor_unmanage_screen): Synchronize
the display.
2006-02-19 Thomas Thurman <thomas thurman org uk>
Removed "move to another workspace" menu when there are
exactly two workspaces. Fixes#151183.
* src/menu.c (meta_window_menu_new): clear
META_MENU_OP_WORKSPACES bit when n_workspaces==2
Fri Feb 17 11:56:35 2006 Søren Sandmann <sandmann@redhat.com>
* src/screen.c (meta_screen_free): Only uncomposite the screen if
there is a compositor.
* src/compositor.c (meta_compositor_new): Warn and fail if the
server doesn't have composite
Thu Feb 16 15:24:42 2006 Søren Sandmann <sandmann@redhat.com>
* src/screen.c (meta_screen_composite_all_windows): New function.
* src/prefs.[ch], src/metacity.schemas.in: Add new
compositing_manager key.
* src/display.c (prefs_changed_callback): Handle
META_PREF_COMPOSITOR_MANAGER
* src/display.c (event_callback): Only call
meta_compositor_process_event() if there is in fact a compositor.
* src/display.c (enable/disable_compositor): Add code to
enable/disable compositor at runtime
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-13 Elijah Newren <newren gmail com>
* src/keybindings.c (process_tab_grab):
We had that prev_window code in multiple places and it was all
identical. Let's just stick it in one place to make the function
easier to read.
2006-02-11 Thomas Thurman <thomas thurman org uk>
Disable alt-f7 if a window can't be moved, and alt-f8 if it
can't be resized. Fixes#328920.
* src/keybindings.c (handle_begin_move, handle_begin_resize):
check window->has_*_func before beginning operation
2006-02-11 Elijah Newren <newren gmail com>
* src/stack.h (enum MetaStackLayer):
* src/stack.c (get_standalone_layer):
actually use META_LAYER_TOP but just manually make it equal to
META_LAYER_DOCK. Add a note point to the EWMH for why we do this.
#330717
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-02-09 Thomas Thurman <thomas thurman org uk>
* src/testboxes.c (test_regions_okay, test_clamping_to_region):
add messages to explain that warnings are harmless
2006-02-03 Thomas Thurman <thomas thurman org uk>
* src/display.c (event_callback): produce warning when invalid
events with no timestamp are received, rather than failing an
assertion
2006-01-30 Elijah Newren <newren gmail com>
* src/display.[ch] (struct MetaDisplay), meta_display_open,
meta_display_set_input_focus_window,
meta_display_focus_the_no_focus_window): Track the active_screen,
(event_callback): If the mouse enters a window on a different
screen, activate the default window on the new screen. May need
to be modified for click-to-focus; we'll wait for feedback. Fixes
#319348.
2006-01-23 Elijah Newren <newren gmail com>
* src/display.c (meta_display_check_threshold_reached): change the
order of the ||'ed items in the if to avoid using an uninitialized
value
* src/prefs.c (meta_prefs_init): fix a couple uninitialized value
problems
2006-01-21 Elijah Newren <newren gmail com>
Patch from Christian Kirbach to prevent a critical warning crasher
when switching themes. #327847.
* src/theme.c (meta_theme_free): since themes are only constructed
as needed and may be NULL, check for that before freeing theme
hash tables
2006-01-21 Elijah Newren <newren gmail com>
* src/common.h (enum MetaActionDoubleClickTitlebar):
* src/frames.c (meta_frames_button_press_event):
* src/prefs.c (action_double_click_titlebar_from_string):
* src/metacity.schemas.in:
Patch from Dick Marinus to add a minimize
double-click-titlebar-action; slightly modified to also include a
none action. #300210.
2006-01-20 Elijah Newren <newren gmail com>
* src/constraints.c (setup_constraint_info): fixed_directions is
only meant for explicit user interactions; disable it for
everything else. There are other bugs and improvements that could
be made with fixed_directions that I should be filing too, but at
least put a FIXME there for now--I'm so lame. Fixes#327822.
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-20 Elijah Newren <newren gmail com>
Fix unitialized value problem when in raise-on-click mode. Søren,
#327572.
* src/display.c (meta_display_check_threshold_reached): make
function be a no op if raise_on_click!=FALSE
* src/display.h (struct MetaDisplay): point out that
grab_initial_[xy] and grab_threshold_movement_reached are only for
raise_on_click==FALSE mode.
2006-01-20 Elijah Newren <newren gmail com>
Patch from Søren to fix some reading-from-free'd-data errors.
#327575
* src/edge-resistance.c (meta_display_cleanup_edges): store the
edges in a hash table so that we can still read their values
within the loop from the other array they are stored in, then free
them all at the end.
2006-01-20 Elijah Newren <newren gmail com>
Fix various initialization and default issues, especially for
--disable-gconf. Make --disable-gconf actually work. #326661.
* configure.in: Fix compilation with --disable-gconf
* src/metacity.schemas.in: Add a note that if any defaults are
changed in this file, src/prefs.c may need to be updated to
reflect the change
* src/prefs.c: set various static global vars to the right default
value, (meta_prefs_init): get the titlebar_font and current_theme
handled better when not using gconf, (struct MetaSimpleKeyMapping,
screen_string_bindings, window_string_bindings): helper vars to
allow some keybindings to work even without gconf,
(init_bindings): initialize bindings for the without-gconf case
too, (init_commands): make sure these are all NULL for the
non-gconf case so that we don't access random memory,
(init_workspace_names): just give these all a default name for the
non-gconf case,
(meta_prefs_change_workspace_name): actually change the name for
the non-gconf case too
2006-01-20 Elijah Newren <newren gmail com>
More careful error handling of values returned by GConf. Fixes
#326615.
* src/prefs.c (get_bool): new helper function, (meta_prefs_init):
use get_bool to handle the case of a gconf key not existing,
(update_cursor_size): sanity check for sane values
2006-01-20 Elijah Newren <newren gmail com>
Prevent rapidly repeated visual bells from hanging metacity.
Fixes#322032.
* src/display.h (struct MetaDisplay): add a last_bell_time field,
(XSERVER_TIME_IS_BEFORE_ASSUMING_REAL_TIMESTAMPS macro,
XERVER_TIME_IS_BEFORE macro): add parentheses around usage of
macro parameter
* src/display.c (meta_display_open): initialize last_bell_time,
(event_callback): don't allow more than one bell per second
2006-01-20 Elijah Newren <newren gmail com>
Patch from Björn Lindqvist to fix#98340.
* src/screen.c (meta_screen_ensure_tab_popup): Make sure an
outline border is shown even if a window frame's width is 0.
Also, correctly handle window outlines in showing desktop mode.
Thu Jan 19 18:05:47 2006 Søren Sandmann <sandmann@redhat.com>
* src/compositor.c (meta_compositor_manage_screen):
g_object_unref() rather than ws_region_unref().
2006-01-16 Elijah Newren <newren gmail com>
* src/window-props.c: manually define HOST_NAME_MAX if not already
defined to fix Solaris compilation issue. Caught by Damien
Carbery, patch from Havoc. #326745
2006-01-15 Kyle Ambroff <kambroff@csus.edu>
* src/workspace.c (focus_ancestor_or_mru_window):
If no valid window is found in the MRU list, then set focus to the
desktop window. (#317405)
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-09 Elijah Newren <newren@gmail.com>
Fix window outline for minimized windows when using alt-esc.
#325092.
* src/display.c (meta_display_begin_grab_op): Specify the showing
type of tabbing operation (Alt tab vs. alt-esc) in addition to the
listing type of tabbing operation (docks vs normal windows) to
meta_screen_ensure_tab_popup().
* src/display.h (enum MetaTabShowType): new convenience enum
* src/screen.[ch] (meta_screen_ensure_tab_popup): require the
showing type be specified in addition to the tabbing type; put the
outline around the window instead of the icon when in alt-esc
mode.
2006-01-09 Elijah Newren <newren@gmail.com>
Fix reduced resources resize handling for windows with sizing or
resizing constraints. #325774.
* src/display.c (meta_display_end_grab_op): Provide constraints.c
with the correct gravity information.
2006-01-09 Elijah Newren <newren@gmail.com>
Be more strict about what is considered a valid region with
partial struts. Fixes#322070.
* src/boxes.[ch]:
(meta_rectangle_expand_region_conditionally):
new function behaving like meta_rectangle_expand_region() but
which only does so when the width and height of the rectangles
meet a certain threshold
(replace_rect_with_list):
Remove a compiling warning
* src/constraints.c:
(constrain_partially_onscreen):
provide minimum thresholds in each direction for the size of the
rectangles to avoid cases where only a single pixel thick layer of
a window might be showing
2006-01-09 Elijah Newren <newren@gmail.com>
* src/bell.c (meta_bell_notify_frame_destroy): Use the right
function to remove the timeout so that we don't crash if removed
at an inopportune time. Fixes#322031.
2006-01-09 Elijah Newren <newren@gmail.com>
* src/edge-resistance.c (apply_edge_resistance): Remove the
"pull-away" edge resistance. Fixes another of the zillions of
issues covered in #321905.
2006-01-09 Elijah Newren <newren@gmail.com>
* src/edge-resistance.c (apply_edge_resistance): Revert to the old
edge resistance behavior for keyboard movement/resizing based
resistance. Not only makes the code much simpler and shorter, but
also fixes another of the zillions of issues covered in #321905.
2006-01-09 Elijah Newren <newren@gmail.com>
* src/edge-resistance.c (apply_edge_resistance): Remove the
timeout resistance at screen/xinerama edges for the whiners.
Okay, it made sense. Fixes another of the zillions of issues
covered in #321905.
2006-01-09 Elijah Newren <newren@gmail.com>
* src/edge-resistance.c (apply_edge_resistance): Make extra
timeout edge resistance apply even if one edge already offscreen.
Fixes another of the zillions of issues covered in #321905.
2006-01-09 Elijah Newren <newren@gmail.com>
Allow edge resistance at both sides of a window and also when
edges don't overlap but are a single pixel away from doing so.
Fixes one of the zillions of issues covered in #321905.
* src/boxes.[ch]:
(meta_rectangle_edges_align):
new function to handle the overlap or off by one determining
whether edge resistance should kick in for an edge.
(meta_rectangle_edge_cmp_ignore_type):
new function to sort edges but ignore the type so that e.g. left &
right edges of windows can be used interchangeably.
(meta_rectangle_edge_cmp):
now uses meta_rectangle_edge_cmp_ignore_type() to do most the work
and just adds an extra condition
* src/edge-resistance.c:
(find_nearest_position):
use meta_rectangle_edges_align() now to determine whether the
edges align,
(apply_edge_resistance, apply_edge_resistance_to_each_side):
have the edge resistance kick in if either the beginning or ending
positions would cause overlap in the given direction -- fixes an
uncommon but annoying corner case,
(apply_edge_snapping, apply_edge_resistance_to_each_side,
meta_display_cleanup_edges,
stupid_sort_requiring_extra_pointer_dereference, cache_edges):
mix edges from both sides now
2006-01-09 Elijah Newren <newren@gmail.com>
Plug a few leaks. Fixes#309178.
* src/main.c (main): remove an unneeded g_set_prgname() call, free
some strings allocated by the GOptions parsing
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.
2005-12-27 Elijah Newren <newren@gmail.com>
* src/tabpopup.c (meta_ui_tab_popup_new): since the title is going
to be treated as markup, escape it. Fixes#324846.
2005-12-12 Elijah Newren <newren@gmail.com>
* src/window.c (update_net_frame_extents): make the debugging
message actually correspond to the code. Patch from Björn
Lindqvist. Fixes#322051.
2005-11-22 Elijah Newren <newren@gmail.com>
Don't allow removing a window from maximized or fullscreened state
to place the titlebar under the top panel. Fixes#322075.
* src/display.c (handle_net_moveresize_window): fix up previous
comments now that I know a little more, modify the code just
slightly to clarify that this is NOT a manual user move/resize
operation
* src/window.c (meta_window_unmaximize,
meta_window_unmake_fullscreen,
meta_window_shove_titlebar_onscreen):
don't claim that these are manual user move/resize operations
2005-11-21 Elijah Newren <newren@gmail.com>
* src/constraints.c (constrain_partially_onscreen): Relax the
partially onscreen constraint to allow the titlebar to touch the
bottom panel in order to make the new constraints code function
the same as the old version. Fixes#322071.
2005-11-21 Elijah Newren <newren@gmail.com>
* src/constraints.c (place_window_if_needed): When updating the
xinerama due to placement, update which maximal/spanning rect set
to use as well
2005-11-20 Elijah Newren <newren@gmail.com>
* src/constraints.c (place_window_if_needed): compute the frame
geometry due to maximization only after actually maximizing.
Fixes#321902.
2005-11-21 Davyd Madeley <davyd@fugro-fsi.com.au>
* src/edge-resistance.c (meta_display_compute_resistance_and_snap):
Use GPOINTER_TO_INT() macro instead of cast to allow compilation on
64-bit architectures without warning.
2005-11-19 Elijah Newren <newren@gmail.com>
* src/edge-resistance.c (apply_edge_resistance): differentiate
between movement towards an edge and movement away from one. Pick
smaller constants for movement away from an edge.
2005-11-18 Elijah Newren <newren@gmail.com>
Merge of all the changes on the constraints_experiments branch.
This is just a summary, to get the full ChangeLog of those
changes (approx. 2000 lines):
cvs -q -z3 update -Pd -r constraints_experiments
cvs -q -z3 diff -pu -r CONSTRAINTS_EXPERIMENTS_BRANCHPOINT ChangeLog
Bugs fixed:
unfiled - constraints.c is overly complicated[1]
unfiled - constraints.c is not robust when all constraints
cannot simultaneously be met (constraints need to be
prioritized)
unfiled - keep-titlebar-onscreen constraint is decoration
unaware (since get_outermost_onscreen_positions()
forgets to include decorations)
unfiled - keyboard snap-moving and snap-resizing snap to hidden
edges
109553 - gravity w/ simultaneous move & resize doesn't work
113601 - maximize vertical and horizontal should toggle and be
constrained
122196 - windows show up under vertical panels
122670 - jerky/random resizing of window via keyboard[2]
124582 - keyboard and mouse snap-resizing and snap-moving
erroneously moves the window multidimensionally
136307 - don't allow apps to resize themselves off the screen
(*cough* filechooser *cough*)
142016, 143784 - windows should not span multiple xineramas
unless placed there by the user
143145 - clamp new windows to screensize and force them
onscreen, if they'll fit
144126 - Handle pathological strut lists sanely[3]
149867 - fixed aspect ratio windows are difficult to resize[4]
152898 - make screen edges consistent; allow easy slamming of
windows into the left, right, and bottom edges of the
screen too.
154706 - bouncing weirdness at screen edge with keyboard moving
or resizing
156699 - avoid struts when placing windows, if possible (nasty
a11y blocker)
302456 - dragging offscreen too restrictive
304857 - wireframe moving off the top of the screen is misleading
308521 - make uni-directional resizing easier with
alt-middle-drag and prevent the occasional super
annoying resize-the-wrong-side(s) behavior
312007 - snap-resize moves windows with a minimum size
constraint
312104 - resizing the top of a window can cause the bottom to
grow
319351 - don't instantly snap on mouse-move-snapping, remove
braindeadedness of having order of releasing shift and
releasing button press matter so much
[1] fixed in my opinion, anyway.
[2] Actually, it's not totally fixed--it's just annoying
instead of almost completely unusable. Matthias had a
suggestion that may fix the remainder of the problems (see
http://tinyurl.com/bwzuu).
[3] This bug was originally about not-quite-so-pathological
cases but was left open for the worse cases. The code from
the branch handles the remainder of the cases mentioned in
this bug.
[4] Actually, although it's far better there's still some minor
issues left: a slight drift that's only noticeable after
lots of resizing, and potential problems with partially
onscreen constraints due to not clearing any
fixed_directions flags (aspect ratio windows get resized in
both directions and thus aren't fixed in one of them)
New feature:
81704 - edge resistance for user move and resize operations;
in particular 3 different kinds of resistance are
implemented:
Pixel-Distance: window movement is resisted when it
aligns with an edge unless the movement is greater than
a threshold number of pixels
Timeout: window movement past an edge is prevented until
a certain amount of time has elapsed during the
operation since the first request to move it past that
edge
Keyboard-Buildup: when moving or resizing with the
keyboard, once a window is aligned with a certain edge
it cannot move past until the correct direction has
been pressed enough times (e.g. 2 or 3 times)
Major changes:
- constraints.c has been rewritten; very few lines of code from
the old version remain. There is a comment near the top of
the function explaining the basics of how the new framework
works. A more detailed explanation can be found in
doc/how-constraints-works.txt
- edge-resistance.[ch] are new files implementing edge-resistance.
- boxes.[ch] are new files containing low-level error-prone
functions used heavily in constraints.c and edge-resistance.c,
among various places throughout the code. testboxes.c
contains a thorough testsuite for the boxes.[ch] functions
compiled into a program, testboxes.
- meta_window_move_resize_internal() *must* be told the gravity
of the associated operation (if it's just a move operation,
the gravity will be ignored, but for resize and move+resize
the correct value is needed)
- the craziness of different values that
meta_window_move_resize_internal() accepts has been documented
in a large comment at the beginning of the function. It may
be possible to clean this up some, but until then things will
remain as they were before--caller beware.
- screen and xinerama usable areas (i.e. places not covered by
e.g. panels) are cached in the workspace now, as are the
screen and xinerama edges. These get updated with the
workarea in src/workspace.c:ensure_work_areas_validated()
2005-10-25 Philip O'Brien <philip.obrien@dal.ca>
* src/prefs.c (meta_preference_to_string): add handling for
META_PREF_CURSOR_THEME and META_PREF_CURSOR_SIZE for more complete
debug info
2005-10-23 Elijah Newren <newren@gmail.com>
Fix edge snapping for multi-screen (non-xinerama) setups. #319425
* src/place.c (get_windows_showing_on_same_screen,
get_vertical_edges, get_horizontal_edges): rename
get_windows_on_same_workspace() to
get_windows_showing_on_same_screen()
* src/place.c (get_windows_showing_on_same_screen): exclude windows
in the list that are on a different screen
2005-10-13 Muktha <muktha.narayan@wipro.com>
* src/themes/Simple/metacity-theme-1.xml: Make the unfocussed
Simple window border visible with high contrast inverse theme.
Fixes#121361.
2005-10-08 Elijah Newren <newren@gmail.com>
Fix a crash that occurs when removing some virtual desktops and
windows happen to be on those desktops. #318306.
* src/workspace.c (meta_workspace_relocate_windows): Since windows
cannot be on more than one workspace at a time, remove the window
from the old workspace before adding it to the new one.
2005-10-03 Elijah Newren <newren@gmail.com>
* src/metacity.schemas.in: clarify the meaning of the auto_raise
preference. Fixes one of the issues in #312421.
2005-10-03 Elijah Newren <newren@gmail.com>
Patch from Ross Cohen to make alt-esc consistent with alt-tab by
leaving stacking of unselected windows unchanged. Fixes#314285.
* src/keybindings.c (process_tab_grab): before raising and showing
the next candidate, reset the stack positions to what they were
at the beginning of the grab
2005-10-03 Elijah Newren <newren@gmail.com>
Patch from Ross Cohen to make alt-esc (show windows instantly)
actually show minimized windows too. Fixes#107072.
* src/keybindings.c (process_tab_grab): initialize tab_unminimized
to FALSE for the target window when starting the grab, when
advancing through the list check to find the previous window and
re-minimize it if it was tab-unminimized, unminimize the new
window we're alt-esc'ing to if it's minimized, (do_choose_window):
raise and unminimize the initial window as well in alt-esc'ing
* src/window.h (struct _MetaWindow): add a tab_unminimized field
* src/window.c (meta_window_new_with_attrs): initialize
tab_unminimized to false
2005-10-03 Elijah Newren <newren@gmail.com>
Patch from Björn Lindqvist fix the workspace switcher tabpopup to
display the right windows and to fix the
pick-a-new-window-to-focus algorithm in order to not select
windows that aren't showing. Fixes#170475.
* src/tabpopup.c (meta_convert_meta_to_wnck,
meta_select_workspace_expose_event): factor out conversion code
from meta_select_workspace_expose_event() into the new
meta_convert_meta_to_wnck() function
* src/tabpopup.c (meta_select_workspace_expose_event):
* src/workspace.c (focus_ancestor_or_mru_window):
replace the buggy window->minimized logic with
!meta_window_showing_on_its_workspace (window)
2005-10-03 Elijah Newren <newren@gmail.com>
Patch from Björn Lindqvist to have ancestors come along with the
transient when moving the window from one workspace to another.
Fixes#314977.
* src/window.c (meta_window_change_workspace): have all ancestors
change workspaces too
2005-10-03 Elijah Newren <newren@gmail.com>
Truncate ridiculously long titles to avoid crashing or letting the
pager crash. Based on patch from Ray, incorporating suggestions
from Havoc and some extensions of my own. Fixes#315070.
* src/display.c (set_utf8_string_hint, meta_display_open):
* src/xprops.[ch] (meta_prop_set_utf8_string_hint):
Move set_utf8_string_hint() to props.[ch], namespace it
("meta_prop_"), and make it public
* src/tabpopup.c (utf8_strndup, meta_ui_tab_popup_new):
* src/util.[ch] (meta_g_utf8_strndup):
Move utf8_strndup() to util.[ch], namespace it ("meta_g_"), and
make it public
* src/display.c (meta_display_open):
* src/display.h (struct _MetaDisplay):
add net_wm_visible_name and net_wm_visible_icon_name atoms to the
list of atoms we work with
* src/window-props.c (set_window_title, set_icon_title): If title
length is greater than 512, truncate it and set
_NET_WM_VISIBLE_NAME or _NET_WM_VISIBLE_ICON_NAME accordingly
2005-10-03 Elijah Newren <newren@gmail.com>
Get the tabbing window outline to work with gtk+ 2.8.4 again.
Fixes#317528.
* src/tabpopup.c (display_entry): gtk+ 2.8.4 needs to know the
mapped state of its windows (see bug 316180), and since we
manually map with gdk_window_show_unraised() we need to manually
set the mapped state too
2005-09-02 Brent Smith <gnome@nextreality.net>
* src/place.c: (meta_window_place): Moved the call to
meta_screen_get_natural_xinerama_list to earlier in
function so that xineramas_list is allocated before
find_first_fit is called. Fixes#315000
2005-08-08 Elijah Newren <newren@gmail.com>
Patch from Brent Smith to fix a duplicate string. Fixes#309774.
* src/theme-parser.c (parse_toplevel_element, parse_draw_op_element):
Change "No \"%s\" attribute on element <%s>" string to "No \"%s\"
attribute on <%s> element"
2005-08-03 Ray Strode <rstrode@redhat.com>
Improve the behavior of keyboard move/resize and edge
snapping. Still not perfect, bug 310888.
* src/effects.c (draw_xor_rect): Make the outside of a
wireframe rectangle line up with the outside edge of its
window, instead of centering the wireframe edges on the
window edges.
* src/keybindings.c (process_keyboard_move_grab): allow
edge snapping in wireframe mode. Adjust code to take
into account changed semantics of find_next_*_edge
functions.
(process_keyboard_resize_grab_op_change): new function
to take some orthogonal logic out of
process_keyboard_resize_grab_op. Only allow keyboard
resize cursor to go to flat edges, not corners.
(process_keyboard_resize_grab): allow edge snapping in
wireframe mode. Fix up snapping logic.
* src/place.c (get_{vertical,horizontal}_edges): use
GArray instead of int *, since the number of output
edges isn't known until the middle of the function now.
Use xor rect extents instead of window extends if in
wireframe mode.
(meta_window_find_next_{vertical,horizontal}_edge: add
new source_edge_position parameter to specify which edge
on the active window to start from when looking for next
edge on the screen. Return the coordinate of the edge
found and not the coordinate of where the window should be
moved to snap to where the edge was found.
* src/window.c (update_move): all the user to specify
an edge to resize with mouse in keyboard resize mode.
window
2005-07-31 Elijah Newren <newren@gmail.com>
* src/stack.c (is_focused_foreach, get_standalone_layer): use only
the expected_focus_window instead of both the focused_window and
the expected_focus_window. Removes an infinite flicker loop in
sloppy and mouse focus, and an ugly one time flicker in click to
focus. Fixes#311400.
2005-07-30 Elijah Newren <newren@gmail.com>
Patch from Jaap Haitsma to make sure that Metacity dialogs have
icons. Fixes#309876.
* src/metacity-dialog.c (kill_window_question,
warn_about_no_sm_support, error_about_command): call
gtk_window_set_icon_name() to set the dialog icon
2005-07-24 Elijah Newren <newren@gmail.com>
* src/place.c (find_most_freespace): try to place windows denied
focus near the focus window and fix a xinerama bug with the
placement, (avoid_being_obscured_as_a_second_modal_dialog): avoid
modal dialogs being obscured in somewhat pathologically strange
circumstances that Eclipse seems to be good at triggering,
(meta_window_place): have dialog windows make use of
avoid_being_obscured_as_a_second_modal_dialog(). Fixes one of the
issues found in #307875.
2005-07-24 Elijah Newren <newren@gmail.com>
* src/window.c (meta_window_raise): raise the window as well as
its ancestor; fixes a stacking bug with an ancestor that has more
than one child window. Fixes one of the issues in #307875.
2005-07-24 Elijah Newren <newren@gmail.com>
* src/window.c (meta_window_free): restore original window size if
the window was maximized, as the FIXME says. ;-) Fixes#137185.
2005-07-23 Elijah Newren <newren@gmail.com>
* src/window.c: (meta_window_activate): revert the patch from
#128380--change _NET_ACTIVE_WINDOW behavior to what it originally
was.
2005-07-14 Elijah Newren <newren@gmail.com>
Patch from Ken Harris to provide a more lenient threshold for
drawing rounded corners. Fixes#122065.
* src/theme.c (meta_frame_layout_calc_geometry): use height +
width > 5 instead of height > 3 && width > 3 as criterion
2005-07-13 Elijah Newren <newren@gmail.com>
Fix a slight bug (causing possible miscoloring of parts of the
titlebar) introduced by the patch from #169982.
* src/gradient.c:
(meta_gradient_create_interwoven):
(meta_gradient_create_multi_vertical):
bitshifting operators do not take precedence over typecasting, so
make sure to use parentheses to get the right operation order.
2005-07-12 Elijah Newren <newren@gmail.com>
Patch from Andrew Johnson to speed up vertical gradients. Fixes
#169982.
* src/gradient.c:
(meta_gradient_create_interwoven):
(meta_gradient_create_vertical):
(meta_gradient_create_multi_vertical):
use memcpy instead of really long loops to set values in memory to
a given pattern.
2005-07-12 Elijah Newren <newren@gmail.com>
Patch from Björn Lindqvist to split up main() into more manageable
chunks and make use of GOpt. Closes#305331.
* src/main.c (usage): remove this function,
(meta_print_compilation_info): new function taken from main(),
(meta_print_self_identity): new function taken from main(),
(struct MetaArguments) new struct to replace some free variables,
(meta_parse_options): new funcion taken from main() but now using
GOpt, (meta_select_display): new function taken from main()
2005-07-11 Matthias Clasen <mclasen@redhat.com>
React to cursor theme changes: (#308106)
* src/prefs.h:
* src/prefs.c: Expose the GConf keys for cursor theme
and size as preferences META_PREF_CURSOR_THEME and
META_PREF_CURSOR_SIZE with getters meta_prefs_get_cursor_theme()
and meta_prefs_get_cursor_size().
* src/display.c (meta_display_open): Initialize the cursor
theme and size.
* src/display.h:
* src/display.c (meta_display_set_cursor_theme): New function
to change the cursor theme and update all cursors.
* src/screen.h
* src/screen.c (meta_screen_update_cursor): New function to
refesh the root cursor of a screen.
* src/main.c (prefs_changed_callback): Update the cursor
theme when the cursor preferences change.
Sun Jun 26 11:19:18 2005 Soeren Sandmann <sandmann@redhat.com>
* src/frames.c: Add a cache of pixmaps for recently exposed frame
areas. Makes metacity a bit faster when dragging windows around.
See bug 141813.
2005-06-10 Ryan Lortie <desrt@desrt.ca>
* src/frames.c: Prevent using the address of a local variable
as a hash key. (Bug #307209)
* src/xprops.c (meta_prop_get_values): Fix a small leak in the
case of a SYNC_COUNTER property value and HAVE_XSYNC not
defined. (Bug #307214)
2005-06-07 Ray Strode <rstrode@redhat.com>
Cleanup font data when done with it (bug 306720).
* src/effects.c (draw_xor_rect): free font info structure.
* src/screen.c (meta_screen_new): pass a 1 not a 0 to
XFreeFontInfo to free font info structure.
(meta_screen_free): call XUnloadFont on GC font before freeing
the GC.
2005-06-02 Elijah Newren <newren@gmail.com>
* src/window.c (meta_window_configure_request): If a window
requests to be raised and is denied, set the demands attention
hint. Fixes#305882.
2005-06-02 Elijah Newren <newren@gmail.com>
* src/window.c (meta_window_focus): if the window has a modal
transient which is being unmanaged, don't focus it. Fixes the
Metacity issue reported in #305362.
2005-05-30 Ray Strode <rstrode@redhat.com>
Bug 305564 again.
When drawing XOR resize popup use "fixed" font instead of
-misc-fixed-*-16-* xlfd. Should work on more xservers.
Also take steps to fail better if the xserver isn't
cooperating.
* src/effects.c (draw_xor_rect): if we can't draw font box
for whatever reason, at least draw grid frames.
* src/screen.c (meta_screen_new): use fixed alias instead
of a xfld. Don't pass GCFont to XCreateGC if font couldn't
be loaded. Print a warning if font couldn't be loaded.
2005-05-26 Elijah Newren <newren@gmail.com>
* src/window.c (meta_window_configure_request): Patch from Greg
Hudson to make sure window position is calculated correctly for
reconfigure requests when part of the XWindowChanges structure is
uninitialized. Fixes#305257.
2005-05-26 Elijah Newren <newren@gmail.com>
* src/window.c: (meta_window_new_with_attrs): put all transients
of the new window, if any exist, in the calc_showing queue. Fixes
#303284.
2005-02-28 Elijah Newren <newren@gmail.com>
Patch from Aidan Delaney to make sure that icons in the alt-tab
popup are dimmed for all hidden windows, not just minimized ones.
Fixes#168455.
* src/screen.c: (meta_screen_ensure_tab_popup): make use
meta_window_showing_on_its_workspace() instead of just checking if
the window is minimized.
2005-02-25 Elijah Newren <newren@gmail.com>
Prevent the visual bell from changing the focus window. Fixes
#123366.
* src/bell.c: (meta_bell_flash_screen): if not in click-to-focus
mode and mouse_mode is also false, increment the focus sentinel so
that we can ignore spurious EnterNotify and LeaveNotify events.
* src.display.c: (event_callback): make sure to also ignore
LeaveNotify events when the focus sentinel isn't clear
2005-02-23 Elijah Newren <newren@gmail.com>
* src/window.c: (meta_window_new_with_attrs): Fix crash that
occurs when stupid apps claim that a window is its own parent.
#168207
2005-02-21 Elijah Newren <newren@gmail.com>
Handle keynav vs. mousenav in mouse and sloppy focus modes. Fixes
#167545.
* doc/how-to-get-focus-right.txt: Update due to this new method
for handling keynav vs. mousenav, plus various other updates that
I previously forgot.
* src/display.h: (struct _MetaDisplay): add a mouse_mode boolean
* src/display.c: (meta_display_open): initialize mouse_mode to
true, (event_callback): have EnterNotify and LeaveNotify events
set mouse_mode to true when focusing a window
* src/keybindings.c: (process_tab_grab): set mouse_mode to false
when using alt-tab/alt-esc, (do_choose_window): likewise,
(do_handle_move_to_workspace): set mouse_mode to false on
move-window-to-workspace-<n> keybindings
* src/window.c (idle_calc_showing): if we're in keynav mode while
using sloppy or mouse focus, use metacity_sentinel to avoid
EnterNotify events being generated from events other than mouse
movement.
* src/workspace.c (meta_workspace_activate_with_focus): add a
FIXME in a potentially duplicate section of code,
(meta_workspace_focus_default_window): use the same focus choice
as click-to-focus if in keynav mode.
2005-02-20 Elijah Newren <newren@gmail.com>
* src/display.c: (event_callback): Handle _NET_CURRENT_DESKTOP
messages that come with timestamps. Fixes the metacity portion of
#161361 other than the portion handled by #128380.
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
2005-01-31 Elijah Newren <newren@gmail.com>
Try 2 to correct misleading and inaccurate wording. Hopefully,
really fixes#165380.
* src/menu.c: Change wording of menu from "Always on Current
Workspace" to "Always on Visible Workspace". "Always on Current
Workspace" could sound like a synonym of "Only on This Workspace"
when it was supposed to be the opposite.
2005-01-31 Elijah Newren <newren@gmail.com>
Correct the stacking when return from fullscreen mode. Fixes
#165718.
* src/window.c: (meta_window_unmake_fullscreen): Update the layer
after resizing the window
2005-01-31 Muktha <muktha.narayan@wipro.com>
src/themes/Atlanta/metacity-theme-1.xml:
src/themes/Simple/metacity-theme-1.xml:
src/themes/Bright/metacity-theme-1.xml:
Make the unfocussed title bar distinguishable. Fixes#125291.
2005-01-28 Elijah Newren <newren@gmail.com>
Patch from RHEL-3 (Havoc doesn't remember how it got there) that
Havoc posted in bug 156511 to fix the problem with fullscreen
windows on a different xinerama monitor not staying on top. I
updated to HEAD. Should fix#156511.
* src/stack.c: (windows_on_different_xinerama): new function,
(get_standalone_layer): let windows on a different screen than the
one with the focus window stay in the fullscreen layer
2005-01-28 Elijah Newren <newren@gmail.com>
* src/menu.c: Change wording of menu to "Always on Current
Workspace" from "Put on All Workspaces", remove a quick-key
conflict between "On _Top" and "Only on _This Workspace" by
switching the latter to "_Only on This Workspace"
* src/window.c: Remove a comment that is no longer necessary
(since bug 87531 has been fixed)
2005-01-28 Elijah Newren <newren@gmail.com>
Take into account the appropriate list of windows when placing a
new one. Fixes#165381.
* src/place.c: (meta_window_place): use
meta_window_showing_on_its_workspace(w) instead of !w->minimzed,
also take into account sticky windows
* src/window.[ch]: rename window_showing_on_its_workspace to
meta_window_showing_on_its_workspace and export it
2005-01-27 Elijah Newren <newren@gmail.com>
Plug a pair of leaks. Fixes#165378
* src/place.c: (meta_window_place, get_windows_on_same_workspace):
free list returned by meta_display_list_windows.
2005-01-27 Elijah Newren <newren@gmail.com>
Treat splashscreens same as other windows for stacking. Fixes
#165243.
* src/stack.h: (MetaStackLayer enum): remove META_LAYER_SPLASH
from the list
* src/stack.c: (get_standalone_layer): remove the special casing
of META_WINDOW_SPLASHSCREEN
2005-01-26 Elijah Newren <newren@gmail.com>
Stick and unstick transients with their parent automatically.
Fixes#152283.
* src/window.c: (window_stick_impl, window_unstick_impl): rename
from meta_window_stick and meta_window_unstick respectively,
(stick_foreach_func): a function to assist calling
window_(un)stick_impl on each transient, (meta_window_stick,
meta_window_unstick): new functions that call window_stick_impl or
window_unstick_impl for the window and each of its transients.
2005-01-26 Elijah Newren <newren@gmail.com>
Patch from John Paul Wallington to keep tooltip on screen
horizontally for xinerama. Fixes#165261.
* src/fixedtip.c: (meta_fixed_tip_show): rename screen_width and
screen_height to screen_right_edge and screen_bottom_edge, set
them using xinerama info instead of just screen geometry, and use
them to determine where to place the tooltip window.
2005-01-26 Arvind Samptur <arvind.samptur@wipro.com>
Don't wireframe when accessibility is on, it apparently
causes a desktop wide freeze.
* src/prefs.[ch] (meta_prefs_init) (change_notify)
(update_gnome_accessibility) (meta_preference_to_string)
(meta_prefs_get_gnome_accessibility) : Add code to monitor
accessibility status.
* src/display.c (meta_display_begin_grab_op): Check
accessibility status before going ahead with wireframe.
Fixes#159538
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)
2004-09-17 Elijah Newren <newren@math.utah.edu>
* src/workspace.c (meta_workspace_focus_mru_window): Don't focus a
window that is minimized (fixes#147947)
2004-09-15 Elijah Newren <newren@math.utah.edu>
Patch from Ken Harris in #135786 to focus a new default window
when lowering via middle-click on the frame.
* src/core.[hc], src/frames.c: rename meta_core_user_lower to
meta_core_user_lower_and_unfocus
* src/core.c (meta_core_user_lower_and_unfocus): if in
click-to-focus mode then also move the window to the back of the
mru list and focus the new default window for the active workspace
2004-09-15 Elijah Newren <newren@math.utah.edu>
Focus the no_focus_window if no suitable window is in the mru list
(should fix the almost contrived extra issue found in #147475)
* doc/how-to-get-focus-right.txt: We no longer need to lie about
only focusing panels upon explicit request.
* src/workspace.c: (meta_workspace_focus_top_window): removed this
function--it was more code than needed and was unreliable anyway,
(meta_workspace_focus_mru_window): if a suitable window isn't in
the mru list, focus the no_focus_window instead of calling
focus_top_window.
2004-09-15 Elijah Newren <newren@math.utah.edu>
Prevent focus inconsistencies by only providing one focus method
(fixes#151990)
* src/screen.c (meta_screen_show_desktop): remove call to
meta_workspace_focus_top_window (it was merely focusing a window
that was going to be hidden anyway, and likely the one that
already had focus)
* src/workspace.[hc]: remove meta_workspace_focus_mru_window and
meta_workspace_focus_top_window from workspace.h, make them static
functions in workspace.c
2004-09-15 Elijah Newren <newren@math.utah.edu>
Remove race condition for focus window choice on window close
followed by rapid mouse movement in sloppy and mouse focus modes
(fixes#152000)
* src/window.c (meta_window_free): Don't increment the focus
sentinel for windows being freed, (idle_calc_showing): don't
increment the focus sentinel for windows being minimized
2004-09-15 Elijah Newren <newren@math.utah.edu>
Fix unwanted loss of focus to the mouse window when using keynav
(fixes#101190)
* src/display.c (event_callback): Ignore EnterNotify events with
xcrossing.mode of either NotifyGrab or NotifyUngrab
2004-09-15 Elijah Newren <newren@math.utah.edu>
Focus correct window after minimizing via the tasklist (fixes
#128200; see also #107681)
* src/display.h (struct _MetaDisplay): track the
previously_focused_window
* src/display.c (meta_display_open): initialize
previously_focused_window
* src/window.c (meta_window_free): clear the
previously_focused_window if it's being freed,
(meta_window_client_message): if we get a request to minimize the
previously_focused_window and the focus_window is a dock or the
desktop, focus the default window, (meta_window_notify_focus):
update the previously_focused_window
2004-08-29 Elijah Newren <newren@math.utah.edu>
* src/window.c (window_takes_focus_on_map): Disable
focus-stealing-prevention for now; there are still some issues and
hard code freeze is tomorrow...so this will have to wait until
Gnome 2.10.
2004-08-27 Havoc Pennington <hp@redhat.com>
* src/compositor.c (meta_compositor_new): disable NameWindowPixmap
stuff always for now, it seemed kind of busted
(paint_screen): don't grab the server during repaint, adds to the
speed, though only slightly.
* src/frames.c (meta_frames_set_window_background): factor out all
the set_background stuff to one function; disable setting
background to transparent, because it breaks existing themes. We
need to add a flag in the theme XML file to say "start me with a
transparent background"
2004-08-27 Elijah Newren <newren@math.utah.edu>
Prevent an assertion failure that can occur after increasing the
number of workspaces; also fix a warning and stacking order when a
window is denied focus (fixes#150615)
* src/window.c (meta_window_stack_just_below): the position of the
window should be set equal to that of the one we want to be below,
not 1 lower than that number
* src/workspace.c (maybe_add_to_list): new function to add
on_all_workspace windows to an mru_list, (meta_workspace_new):
call maybe_add_to_list for all windows on the screen in order to
initialize the mru_list
2004-08-26 Havoc Pennington <hp@redhat.com>
* src/frame.c: delete extra copy of find_argb_visual so things
compile
* src/compositor.c (HAS_NAME_WINDOW_PIXMAP): copy the
XCompositeNameWindowPixmap() stuff from xcompmgr, though I can't
say I really know what it's supposed to help with (painting the
window border?)
2004-08-26 Havoc Pennington <hp@redhat.com>
* src/frame.c, src/theme.c: couple of cosmetic tweaks from
resolving my local patch with the bugzilla patch from the 8-19
entry below
2004-08-26 Havoc Pennington <hp@redhat.com>
* configure.in: move the have_xrender variable initialization up
in the file since it can be set as part of composite check
2004-08-19 Havoc Pennington <hp@redhat.com>
Fixes from Rich Wareham
* src/display.h (struct _MetaDisplay): add render extension check
to the display
* src/display.c: check for render
* configure.in: don't build compositing manager by default, don't
want any nasty surprises; check for render separately from
compositing manager
* src/frame.c: use an ARGB visual when available for the window
frame, so we can be all cool-ass
2004-08-25 Elijah Newren <newren@math.utah.edu>
Make dialogs that Metacity shows follow focus-stealing-prevention
conventions. (fixes one issue in #149028; see comments 47-54)
* src/delete.c (delete_ping_reply_func,
delete_ping_timeout_func): Make callback functions take a
timestamp arg, (delete_ping_timeout_func): pass the timestamp to
metacity-dialog
* src/display.c (meta_display_ping_timeout): add a timestamp to
the call to the ping_timeout_func, (meta_display_ping_window,
process_pong_message): add a timestamp to the call to the
ping_reply_func
* src/display.h (MetaWindowPingFunc typedef): add a timestamp to
this function typedef
* src/keybindings.c (error_on_command): require a timestamp and
pass the timestamp on to metacity-dialog, (handle_run_command):
pass a timestamp to error_on_command
* src/metacity-dialog.c (copy_of_gdk_x11_window_set_user_time):
new function (temporary; only for use while using gtk+-2.4),
(kill_window_question, warn_about_no_sm_support,
error_about_command): make these functions take a timestamp and
call copy_of_gdk_x11_window_set_user_time, (main): require the
first two args to the program to be "--timestamp <timestamp>"
* src/session.c (warn_about_lame_clients_and_finish_inter): pass a
timestamp of 0 to metacity-dialog to prevent focus (it's a popup
not generated by and kind of user request).
Fri Aug 20 12:54:12 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* src/display.c (meta_display_end_grab_op): Move wireframe code
before grab is released to prevent endless loops with fullscreen
windows.
2004-08-18 Havoc Pennington <hp@redhat.com>
* src/display.h (struct _MetaDisplay): track the last_xor_rect
separately from the current window size, and then use that to
paint the wireframe including the frame, and taking into
account shaded windows.
* src/window.c (meta_window_get_xor_rect): new function to compute
the xor rect; it is not really 100% right, because it uses the
frame dimensions from the window at the start of the move/resize.
But probably won't break in practice.
2004-08-15 Rob Adams <readams@readams.net>
* src/windows.c (meta_window_update_struts): use height and
top/bottom struts to compute gap (copy/paste bug).
2004-08-15 Rob Adams <readams@readams.net>
* src/window.c (meta_window_update_struts): Allow struts larger
than 1/2 the screen width/height, as long as there's a minimum
sized gap between them. Patch from Bill Haneman <billh@gnome.org>
for bug #144126.
Mon Aug 9 05:38:33 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* src/effects.c (graphics_sync): New function.
* src/effects.c (effects_draw_box_animation_timeout): Use it here
to synchronize with the hardware between each frame.
2004-08-08 Rob Adams <readams@readams.net>
* src/window.c (meta_window_move_resize_internal): Add #ifdef
around XSYNC code; fixes compile problem if XSYNC is disabled.
Path for #149314 from Peter O'Shea and independently Mike Castle.
Sun Aug 8 14:20:00 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* src/frame.c (meta_frame_set_screen_cursor): Flush after setting
cursor. (Rest of #149413).
2004-08-07 Elijah Newren <newren@math.utah.edu>
* src/display.c (event_callback): activating the current workspace
should be a no-op. This prevents a race condition in focus window
choice when activating a window via the taskbar. Fix for #149589.
2004-08-07 Elijah Newren <newren@math.utah.edu>
* window.c, window.h: Revert Rob's 2004-07-31 patch that ignored
net_wm_user_time when unminimizing a window
* window.c (meta_window_activate): If a nonzero timestamp is
passed, update the window's net_wm_user_time accordingly. (see
comments 102-108 of bug 118372)
2004-08-07 Rob Adams <readams@readams.net>
Remove some extraneous items that could sometimes appear in the
window menu. Fix for #144493.
* src/menu.c (menuitems): Change the second separator to key on
whether there are any workspaces.
(meta_window_menu_new): use NULL label instead of 0 op to identify
separator
* src/window.c (meta_window_show_menu): Change the conditions on
the directions to take into account "holes" in the workspace
layout and also only set META_MENU_OP_WORKSPACES when there's more
than one workspace.
2004-08-06 Elijah Newren <newren@math.utah.edu>
* src/display.c (event_callback): Focusing a window upon unshowing
the desktop in various ways (panel applet or keybinding) was
inconsistent for sloppy and click focus modes. Fix this by
calling meta_workspace_focus_default_window after unshowing the
desktop via a _NET_SHOWING_DESKTOP message. (resolves#149543)
2004-08-06 Elijah Newren <newren@math.utah.edu>
* src/workspace.c (meta_workspace_focus_default_window): prevent
keyboard from "getting locked" upon workspace switch, by making
sure that the no_focus_window has focus if no other window does.
(fixes#147475)
2004-08-05 Elijah Newren <newren@math.utah.edu>
Have newly mapped windows that are denied focus appear after the
focused window in the alt-tab list. This allows one to switch to
such a window with a single alt-tab press.
* src/window.c (ensure_mru_position_after): new function,
(meta_window_show): If newly mapped window is denied focus, call
ensure_mru_position_after to make the window appear after the
focus window in the mru list.
2004-08-05 Elijah Newren <newren@math.utah.edu>
* src/window.c (meta_window_stick): prepend window to mru list
instead of appending, since making the window sticky should imply
that it is the most recently used, not the least recently. (fixes
#149369)
2004-08-02 Elijah Newren <newren@math.utah.edu>
Fix some bugs (reported in #120100) regarding the focus window
when using the workspace switcher.
* src/display.c (event_callback): When switching workspaces due to
a _NET_CURRENT_DESKTOP message, make sure to focus the default
window as well.
* src/workspace.c (meta_workspace_focus_default_window,
meta_workspace_focus_mru_window): Make DOCK or DESKTOP windows
have lower priority than others when choosing a window to focus.
(For the former function, this means don't focus them at all; for
the latter, this means only focus them (via the
meta_workspace_focus_top_window call) if no other mru window can
be found.)
2004-07-31 Rob Adams <readams@readams.net>
Fix bug that caused windows to not be focused on unminimizing
because of user time support.
* src/window.c (meta_window_new_with_attrs): initialize
focus_despite_user_time bit
(window_takes_focus_on_map): focus if focus_despite_user_time
despite user time, interestingly enough
(meta_window_show): reset focus_despite_user_time after showing
* src/window.h (_MetaWindow): add focus_despite_user_time bit
2004-07-31 Rob Adams <readams@readams.net>
Fix some support for EWMH hints, and fix USER_TIME support to
include the DEMANDS_ATTENTION hint. Also includes some code for
implementing _NET_RESTACK_WINDOW and _NET_MOVERESIZE_WINDOW, but
this is disabled pending feature thaw.
* COMPLIANCE: update with new information
* src/display.c (meta_display_open): add new hints to list
* src/display.h (_MetaDisplay): Add new atoms to struct
* src/screen.c (set_supported_hint): update the list of support
hints.
(set_desktop_viewport_hint): new function sets the viewport hint
to (0,0) as required by the spec for WMs with no viewport support.
(set_desktop_geometry_hint): new function to set the desktop size
hint to the size of the display, since we don't implement large
desktop support, as required by the spec.
(meta_screen_resize): update the geometry hint on screen resize
* src/window.c (meta_window_new_with_attrs): Initialize
demands_attention state
(set_net_wm_state): Set demands_attention hint in the window state
(meta_window_show): If we don't pop up a window because of
USER_TIME, set DEMANDS_ATTENTION on the window.
(meta_window_focus): When a window receives focus, remove
DEMANDS_ATTENTION hint
(meta_window_client_message): Allow other apps to set
DEMANDS_ATTENTION on a window. Also, if the _NET_ACTIVE_WINDOW
hint includes a timestamp, use it.
(update_net_wm_state): Read DEMANDS_ATTENTION state also
* src/window.h (_MetaWindow): add wm_state_demands_attention bit.
2004-07-22 Rob Adams <readams@readams.net>
* src/metacity.schemas.in: Add trailing quotes to keybinding
explanation text. Patch from Emil Soleyman-Zomalan.
2004-06-24 Elijah Newren <newren@math.utah.edu>
Make choice of focus window be consistent for each focus mode.
Fixes#135810.
* src/delete.c: (meta_window_delete): In some #if 0'ed code,
replace meta_workspace_focus_mru_window with
meta_workspace_focus_default_window (just in case the code becomes
un-#if 0'ed out).
* src/screen.c, src/screen.h: Change
meta_screen_focus_mouse_window to meta_screen_get_mouse_window,
and don't focus the window when found but rather return it.
* src/window.c: (meta_window_free, meta_window_minimize): replace
meta_workspace_focus_mru_window with
meta_workspace_focus_default_window.
* src/workspace.c: (meta_workspace_focus_default_window): Focus
appropriately for the given focus method:
click-to-focus: focus MRU window (== toplevel window)
sloppy focus: focus the window under the pointer if there is
such a window, otherwise focus the mru window
mouse focus: focus the window under the pointer if there is
such a window, otherwise don't focus anything
2004-06-24 Elijah Newren <newren@math.utah.edu>
* src/window.c: Avoid a race condition on the choice of window to
focus after the previously focused window gets closed or
minimized. Fixes#131582.
2004-06-24 Elijah Newren <newren@math.utah.edu>
* src/metacity.schemas.in: make naming for "move a window"/"move
the window"/"move window" more consistent. Patch from Michael
Terry for #142235.
2004-06-24 Elijah Newren <newren@math.utah.edu>
* src/session.c: Change meta_warning to meta_topic on failure to
connect to a session manager. Fixes#136218.
2004-06-17 Elijah Newren <newren@math.utah.edu>
Add support for _NET_WM_USER_TIME
* src/display.c:
(meta_display_open): Add _NET_WM_USER_TIME to atom_names[],
(event_callback): Manually set _NET_WM_USER_TIME upon KeyPress
(doesn't work since keyboard isn't grabbed) and ButtonPress (does
work), this is just a fallback for applications that don't update
this themselves.
* src/display.h: (struct _MetaDisplay): Add atom_net_wm_user_time field
* src/screen.c: (meta_screen_apply_startup_properties): Check for
TIMESTAMP provided from startup sequence as well.
* src/stack.c:
s/meta_window_set_stack_position/meta_window_set_stack_position_no_sync/,
(meta_window_set_stack_position): New function which calls the
meta_window_set_stack_position_no_sync function followed immediately
by calling meta_stack_sync_to_server.
* src/window-props.c:
(init_net_wm_user_time), (reload_net_wm_user_time): new functions,
(reload_wm_hints): also load atom_net_wm_user_time
* src/window.c:
new XSERVER_TIME_IS_LATER macro (accounts for timestamp wraparound),
(meta_window_new_with_attrs): add timestamp attributes,
(window_takes_focus_on_map): use TIMESTAMP from startup
notification and _NET_WM_USER_TIME to decide whether to focus new
windows,
(meta_window_show): if app doesn't take focus on map, place it
just below the focused window in the stack
(process_property_notify): check for changes to _NET_WM_USRE_TIME,
(meta_window_stack_just_below): new function
* src/window.h:
(_MetaWindow struct): new fields for initial_timestamp,
initial_timestamp_set, net_wm_user_time_set, and net_wm_user_time,
(meta_window_stack_just_below): new function
2004-06-21 Anders Carlsson <andersca@gnome.org>
* src/common.h:
* src/menu.c: (menu_closed), (activate_cb):
* src/window.c: (menu_callback):
Add a timestamp argument to menu functions and
use it in meta_window_delete.
Sat Jun 19 02:21:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Fix bug 143333, support for update counter spec, and 109362,
schedule compensation events when events are ignored.
* src/display.c (meta_display_open): Add _NET_WM_SYNC_REQUEST and
_NET_WM_SYNC_REQUEST_COUNTER atoms. Remove the old
METACITY_SYNC_COUNTER stuff.
(meta_display_begin_op): Setup the sync counter
* src/xprops.c, src/xprops.h, src/window-props.c, src/display.h:
Add new atoms.
* src/window.c (send_sync_request): new function.
(meta_window_move_resize_internal): send a sync request before
resizing.
(check_move_resize_frequence): Rework logic to also check the SYNC
case. If an event is ignored return the remaining time.
(update_resize_timeout): Timeout that gets called when a
compensation event is scheduled.
(uddate_resize): schedule compensation events when an event is
ignored.
(meta_window_handle_mouse_grap_op_event): When an alarm is
received and sync was turned off, turn it back on.
* src/window.h (struct MetaWindow) Add some variables
2004-06-04 Jeff Waugh <jdub@perkypants.org>
* src/metacity.schemas.in: Set titlebar_uses_system_font = false. The
previous default was almost violent in its lack of appreciation for
human beings. In fact, this entire setting should probably be removed, but
for now, let's just fix the default. Permission granted by Havoc.
2004-05-02 Rob Adams <readams@readams.net>
* src/metacity-dialog.c (warn_about_no_sm_support): make the no sm
support warning dialog resizable, since the default GTK warning
dialog not has default not resizable. Fix for #141672 from
Olivier Crete.
2004-04-29 Rob Adams <readams@readams.net>
* src/prefs.c (change_notify): Add a value type check for the
visual bell/audible bell gconf settings. Patch from Jarrod
Johnson for #141409.
2004-04-19 Mark McLoughlin <mark@skynet.ie>
Syncing across this change from libwnck.
Patch from Neil Muller <neil@dip.sun.ac.za> in bug #133979.
* src/iconcache.c: (find_largest_sizes), (find_best_size):
Don't down-size nitems from a gulong to an int. Fixes a
crash with enlightenment, apparently.
2004-03-01 Rob Adams <readams@readams.net>
* src/stack.c (compute_layer): don't promote due to transiency; we
handle that elsewhere now.
(ensure_above): perform layer promotion here as well as stack
position promotion. Note that this means that we need to do stack
constraints now on layer change now.
(get_maximum_layer_of_ancestor): remove function
(max_layer_func): remove function
(MaxLayerData): remove struct
2004-02-27 Rob Adams <readams@readams.net>
* src/window.c (meta_window_notify_focus): only move on MRU list
if the window belongs on the workspace, since the FocusIn event
could be for a window whose workspace we've since switched away
from. Possible fix for #122016.
* src/workspace.c (meta_workspace_contains_window): search for the
workspace in window->workspaces rather than the window in
workspace->windows. Since the number of workspaces is at most 36,
this is a O(1) lookup rather than a O(n) lookup. Sorry; couldn't
resist.
2004-02-27 Rob Adams <readams@readams.net>
* src/metacity.schemas.in: Change
move_to_workspace_left/right/up/down keybindings to
<Control><Alt><Shift> arrow to avoid conflicting with new
keybindings in spacial nautilus.
2004-02-27 Rob Adams <readams@readams.net>
Handle layer promotion of transient descendants of layer-promoted
windows to also be layer promoted, using a simple iterative
algorithm.
* src/stack.c (compute_layer): change name to promote_layer, and
convert to simply perform any necessary layer promotion without
computing the standalone layer.
(max_layer_func): use window->layer instead of
get_standalone_layer
(get_maximum_layer_of_ancestor): use window->layer instead of
get_standalone_layer
(meta_stack_ensure_sorted): implement iterative algorithm,
explained in a long comment.
* src/window.h: add a tmp_layer field used by stack.c for
determining if the stack is dirty or not, since maintaining this
information in meta_stack_ensure_sorted is no longer practical.
2004-02-23 Rob Adams <readams@readams.net>
Add my copyright notice to a number of files on which it should
already exist.
* src/window.c (meta_window_notify_focus): modify code to move to
front of MRU list so that we can have an assert that it was there
in the first place. This code may be causing some crashes. See
#131196.
2004-02-23 Rob Adams <readams@readams.net>
Add my copyright notice to a number of files on which it should
already exist.
* src/window.c (meta_window_notify_focus): modify code to move to
front of MRU list so that we can have an assert that it was there
in the first place. This code may be causing some crashes. See
#131196.
2004-02-19 Rob Adams <readams@readams.net>
* src/prefs.h: remove trailing comma in MetaKeyBindingAction enum.
Fix for #134868 thanks to bugzilla-gnome@thewrittenword.com.
2004-02-14 Rob Adams <readams@readams.net>
If we're moving a window and receive a _NET_CURRENT_DESKTOP
message indicating a workspace switch, bring along the drag window
to the new workspace, solving a potentially weird bug where the
window would be lost on the old workspace. This also makes it
possible to implement edge flipping in an external program with
just a few lines of code. Patch for #131630 from ed@catmur.co.uk.
* src/keybindings.c (switch_to_workspace): remove function -- no
longer needed.
(handle_activate_workspace): call meta_workspace_activate instead
of switch_to_workspace
* src/workspace.c (meta_workspace_activate_with_focus): if we're
in a move grab op, bring along the drag window.
2004-01-17 Rob Adams <readams@readams.net>
* src/metacity.schemas.in: Default binding removed for
toggle_shaded, since we don't have anything in the graphical UI
for it any more.
2004-01-17 Rob Adams <readams@readams.net>
* src/window.c (meta_window_show_menu): Don't show
left/right/up/down if a window is sticky. Make "On Top"
insensitive for docks, splash screens, and desktops since it has
no effect anyway.
2004-01-10 Rob Adams <readams@readams.net>
* src/metacity.schemas.in: update default
action_double_click_titlebar to be toggle_maximize instead of
toggle_shade. See #131126.
2004-01-12 Rob Adams <readams@readams.net>
* src/constraints.c (meta_window_constrain): if we maximize after
placement, and the window is too big to fix in the work area,
define a sane saved_rect approximately with dimensions
three-quarters approximately three quarters the size of the work
area. This avoids the problem where large windows would
unmaximize and actually get bigger. See #93590.
2004-01-09 Thomas Fitzsimmons <fitzsim@redhat.com>
Add _NET_FRAME_EXTENTS and _NET_REQUEST_FRAME_EXTENTS.
* src/display.c: include xprops.h
(process_request_frame_extents): new function
(meta_display_open): add _NET_FRAME_EXTENTS and
_NET_REQUEST_FRAME_EXTENTS atoms
(event_callback): handle frame extents message
* src/display.h (struct _MetaDisplay): add atom_net_frame_extents
and atom_net_request_frame_extents
* src/theme.c (meta_pango_font_desc_get_text_height): make font_desc
parameter const
* src/ui.c: include prefs.h
(meta_ui_theme_get_frame_borders): new function
* src/window.c (update_net_frame_extents): new function
(meta_window_move_resize_internal): update frame extents
property when frame geometry changes
* src/screen.c (set_supported_hint): add atom_net_frame_extents
and atom_net_request_frame_extents
2003-01-04 Rob Adams <readams@readams.net>
Maintain the button grab for sloppy and mouse focus all the time.
This fixes a number of problem introduced by trying to drop the
grab; we now do this only for click to focus mode. This has the
unfortunate effect that #102209 reappears for sloppy and mouse
focus, but this seems unavoidable, because of limitations in the X
protocol. See #115072.
* src/display.c (meta_display_grab_focus_window_button): #if 0 the
section on not grabbing unless in click-to-focus mode.
* src/window.c (meta_window_notify_focus): drop focus button grab
on FocusIn and acquire it on FocusOut only when in click-to-focus
mode.
2003-12-25 Havoc Pennington <hp@redhat.com>
* src/compositor.c (meta_compositor_process_event): change to
track all children of the root window, not only mapped children;
this keeps us from losing track of the stacking order
* src/display.c (event_callback): don't do any of the compositor
event handling inline, do it all in compositor.c
2003-12-20 Rob Adams <readams@readams.net>
Reorganize the window menu according to discussion on #110904.
The workspace name mnemonic chunk of the patch is thanks to
Jonathan Blandford.
* src/common.h: add MENU_OP_ABOVE, MENU_OP_UNABOVE, MENU_UP_MOVE_TO_*
menu ops.
* src/core.c (meta_core_get_menu_accelerator): add accelerator for
the new menu ops.
* src/menu.c: add checked attribute in _MenuItem struct to display
a checkmark next to a menu item. Add the new menu items to
menuitems.
(get_workspace_name_with_accel): Add mnemonics even to renamed
workspaces.
(menu_item_new): provide support for the checked attribute
(meta_window_menu_new): construct new submenu for workspace
switching.
* src/window.c (menu_callback): implement support for the new menu
ops.
(meta_window_show_menu): don't use the OP_*SHAPE operations, and
compute which of the OP_MOVE_TO_* ops should be used for the
current workspace and workspace layout. Add the OP_*ABOVE
operations.
2003-12-17 Rob Adams <readams@readams.net>
* src/display.c (meta_display_open): initialize
grab_wireframe_active to FALSE. Fix for #128090.
2003-12-17 Rob Adams <readams@readams.net>
* src/tabpopup.c (meta_ui_tab_popup_new): Don't try to call
utf8_strndup on a null title for an entry. Fix for #128566.
* src/workspace.c (meta_workspace_free): Call g_list_free on the
mru_list, since with sticky windows that MRU list could well not
be emtpy. See #122016.
2003-12-13 Rob Adams <readams@readams.net>
* src/window.c (meta_window_new_with_attrs): set on_all_workspaces
in all cases _before_ adding to the workspaces, so that windows
initially on all workspaces are added correctly to the MRU lists.
Fix for #120907.
* src/workspace.c (meta_workspace_add_window): handle sticky
windows so that we add to add mru lists if needed
(meta_workspace_remove_window): handle sticky windows so that they
are removed from all mru lists if needed.
2003-12-13 Rob Adams <readams@readams.net>
Add increased robustness for dealing with all workspaces windows
and MRU lists.
Also add very preliminary _NET_WM_USER_TIME
support, limited to simply listening for the property and keeping
an internal variable updated, and also treating some input events
as though they were user time updates.
* src/window.c (meta_window_new_with_attrs): set on_all_workspaces
in all cases _before_ adding to the workspaces, so that windows
initially on all workspaces are added correctly to the MRU lists.
Fix for #120907.
(process_property_notify): add net_wm_user_time support.
* src/workspace.c (meta_workspace_add_window): handle sticky
windows so that we add to add mru lists if needed
(meta_workspace_remove_window): handle sticky windows so that they
are removed from all mru lists if needed.
* src/display.[ch] (meta_display_open): add net_wm_user_time support.
(event_callback): simulate user time update on key and button presses.
* src/screen.c (set_supported_hint): add net_wm_user_time support.
* src/window-props.c (init_net_wm_user_time): new function for
user_time support
(reload_net_wm_user_time): new function for user_time support
(meta_display_init_window_prop_hooks): add hook for user_time
2003-12-12 Havoc Pennington <hp@redhat.com>
* src/window.c (meta_window_free): unstick window to get it out of
mru_list it should not be in; assert that window has been removed
from all mru_list. Perhaps fixes#122016 crash.
2003-11-24 Havoc Pennington <hp@redhat.com>
* src/display.c (meta_display_begin_grab_op): add an event_serial
argument and use it when the pointer is already grabbed
automatically on the button press. May fix bug #126871
2003-11-23 Havoc Pennington <hp@redhat.com>
* src/compositor.c: move xcompmgr code in here (minus drop
shadows), untested since Keith's server just crashes at the
moment. "It compiles"
2003-11-20 Havoc Pennington <hp@redhat.com>
* src/window.c (meta_window_new_with_attrs): new function
* src/display.c, src/screen.c: create the compositor and feed
windows and events to it
2003-11-16 Rob Adams <readams@readams.net>
Create COMPLIANCE document describing metacity specification
compliance. Right now gives detailed EWMH compliance; still need
to add ICCCM compliance information. Also some minor fixes to
bring metacity into compliance on some points.
* COMPLIANCE: new file
* src/display.h, src/display.c (meta_display_open),
src/screen.c (set_supported_hint): add
atom_net_wm_action_fullscreen and atom_net_wm_action_minimize
* src/window.c (set_allowed_actions_hint): some fixes to which
hints to set and add fullscreen and minimize.
2003-11-16 Rob Adams <readams@readams.net>
* src/window.c (meta_window_notify_focus): add paranoia check to
make sure a window is really on a workspace before inserting it at
the beginning of the MRU list. Maybe there's a race condition
with focusing and workspace switching. Hopefully a fix for #122016.
2003-11-15 Havoc Pennington <hp@redhat.com>
* src/main.c (main): fix warning
* src/compositor.c: add a new file to contain compositing manager
functionality; not yet implemented at all.
2003-11-15 Rob Adams <readams@readams.net>
Inherit visual from frame window so that metacity will work with
the new compositing manager extension work by Keith on
freedesktop.org, so that ARGB windows can be full
alpha-transparent without a metacity frame getting drawn in the
background. In the long term, we need to actually set alpha
values when drawing the frame so that it will really work; this is
a stopgap solution. Patch from Keith Packard; see Bug 126875.
* src/frame.c (meta_window_ensure_frame): pass client visual to
frame.
* src/ui.[ch] (meta_ui_create_frame_window): add new xvisual
parameter and use it to create new window.
2003-11-15 Rob Adams <readams@readams.net>
* src/window.c (update_net_wm_type): don't set window->type_atom
here so that the type-inference code will actually be called. Fix
for #126873 from Keith Packard.
2003-11-08 Rob Adams <readams@readams.net>
* src/window.c (meta_window_move_resize_internal): configure frame
first if we grow more than we shrink combined in both dimensions.
Patch from Soren Sandmann for #108925.
2003-11-07 Rob Adams <readams@readams.net>
* src/place.c (meta_window_place): use maximize_after_placement to
automaximize in meta_window_place; avoids a problem with not
recalculating the frame geometry after auto-maximizing.
2003-11-07 Rob Adams <readams@readams.net>
* src/window.c (window_should_be_showing): show the window if it's
a transient of a dock or desktop, since otherwise such windows are
invisible in show desktop mode. Fix for #124648.
2003-11-07 Rob Adams <readams@readams.net>
* src/main.c (main): Try harder to find a theme in the event that
the theme in the preference cannot be found. Patch from Marcin
Krzyzanowski. See #125815.
* src/place.c (meta_window_place): use "visual" centering for
dialog placement and clip new dialogs to an xinerama workspace.
Fix for #118336.
2003-10-30 Havoc Pennington <hp@redhat.com>
* src/menu.c (meta_window_menu_new): patch to avoid creating
stick/unstick menu items when only one workspace, bug #116563
from Michael Terry
2003-10-25 Havoc Pennington <hp@redhat.com>
* src/window.c (meta_window_notify_focus): if a window is focused
which is not either a dock or a transient in the same group as a
dock, shuffle all dock/desktop windows to the end of the MRU list
so they won't annoyingly get focus all the time. #123816
2003-10-13 Havoc Pennington <hp@redhat.com>
In the "prefs cause code complexity" department, here's a "sloppy
focus die die die" kind of moment.
* src/display.c (meta_display_grab_focus_window_button): don't
grab in sloppy focus mode, since we were dropping the grab on
window enter anyway this just removes races from the current
behavior.
* src/display.c (prefs_changed_callback): ungrab/grab on focus
mode changes, since we treat sloppy and click differently.
2003-10-12 Havoc Pennington <hp@redhat.com>
Merge reduced_resources mode patch from the branch. Offers
wireframe and no-animations.
* src/window.c (implement_showing): no animation if we are
in reduced resources mode
* src/prefs.c: add REDUCED_RESOURCES pref
* src/window.c (meta_window_update_keyboard_resize): fix to
modify grab_anchor_window_pos to grab_wireframe_rect if
appropriate instead of window->rect
* src/display.h (struct _MetaDisplay): add grab_start_serial used
to avoid responding to events that occurred prior to the grab
initialization.
Still broken in various ways, specifically EnterNotify that
occurred prior to XGrabPointer is processed as if it occurred
after.
* src/window.c (meta_window_update_keyboard_move): add this
instead of meta_window_warp_pointer() crack
* src/effects.c (meta_effects_update_wireframe): draw a kind of
grid for the wireframe, instead of just a rectangle, like twm
* src/screen.c (meta_screen_new): line width of 3 for the XOR gc
"Reduced resources" mode based on wireframe patch from
Erwann Chenede. Still pretty buggy.
* src/keybindings.c (process_keyboard_move_grab)
(process_keyboard_resize_grab): add gruesome wireframe hacks
* src/display.c (meta_display_end_grab_op): end wireframe
(meta_display_begin_grab_op): begin wireframe
* src/effects.c (meta_effects_end_wireframe)
(meta_effects_update_wireframe, meta_effects_begin_wireframe):
routines to draw the wireframe stuff
* src/window.c (window_should_be_showing): hide window when
doing wireframe, commented out as it breaks grab
* src/window.c (meta_window_refresh_resize_popup): handle wireframe
* src/screen.c (meta_screen_new): create a screen->root_xor_gc
for use in drawing wireframes
* src/frames.c (meta_frames_push_delay_exposes): repaint
everything before we delay
2003-10-11 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_begin_grab_op): initialize
display->grab_have_pointer to FALSE, previously I think you could
get a case where we didn't have the grab and thought we did.
Bugs were reported with this happening. Of course we still have
the "why did the grab fail" problem, but it should be less
noticeable with this fixed.
2003-10-06 Rob Adams <readams@readams.net>
* src/constraints.c (constraint_onscreen_*_func): disable onscreen
resize constraints for right, left, and bottom, since there is no
way to violate onscreen constraints by resizing in these
directions and the code to implement the constraints made some
incorrect assumptions. Fix for #120701, #120756, #123165,
#123631, #123838.
2003-09-30 Havoc Pennington <hp@redhat.com>
* src/window.c (meta_window_queue_move_resize): add the moveresize
idle at META_PRIORITY_RESIZE so it runs before GTK does any
drawing, may fix bug #109211 (seem to for me)
* src/ui.h (META_PRIORITY_RESIZE): add this between GTK
resize/redraw priorities
* src/display.c (meta_display_queue_retheme_all_windows): remove
some debug spew from meta_warning
2003-07-28 Rached Ben Mustapha <rached@benmur.net>
Fix bug #118428
* src/window.c (redraw_icon): Also redraw window icon if the window
is not mapped but its frame is.
(idle_update_icon): Unset the window->update_icon_queued flag.
2003-09-29 Havoc Pennington <hp@redhat.com>
* src/tabpopup.c (meta_ui_tab_popup_new): put a random cap on
number of characters in the title of each window, bug #109301
2003-09-29 Havoc Pennington <hp@redhat.com>
* src/wm-tester/test-size-hints.c: a little program to test size
hints, for now just a 0x0 min size to verify bug #113320
2003-09-29 Havoc Pennington <hp@redhat.com>
* src/async-getprop.c (async_get_property_handler): attempt to fix
this to return the data as an array of long even on 64-bit as with
XGetWindowProperty() breakage, bug #114035, credit to Gwenole
Beauchesne for tracking down.
2003-09-29 Havoc Pennington <hp@redhat.com>
* src/xprops.c (cvtINT16toInt): fix the 64-bit check not to use
macros from the X tree that don't get set
* configure.in: check for sizes of various types
2003-09-29 Havoc Pennington <hp@redhat.com>
* src/delete.c (meta_window_delete): don't move the focus after
you click the close button on a window. bug #108706
2003-09-29 Havoc Pennington <hp@redhat.com>
* src/main.c (find_accessibility_module): fix warnings (one was a
real bug)
* src/ui.c (meta_gdk_pixbuf_get_from_pixmap): fix warning that
probably explains remaining crash on bug #116923. Jeez, need to
use -Werror here or something.
Fix#103575, spawn child processes on proper screen.
* src/keybindings.c (error_on_command): pass --screen to
metacity-dialog
(handle_run_command): launch user command with DISPLAY reflecting
the screen you launch it from
* src/delete.c (delete_ping_timeout_func): pass --screen to
metacity-dialog
2003-09-26 Havoc Pennington <hp@redhat.com>
* src/display.c (event_callback): when focus on root window
becomes None, set it to something other than None so keybindings
keep working and print a warning about how some application sucks.
#84564
(event_callback): Fix debug spew to print focus event details
properly
(meta_display_open): when setting initial focus, always use
RevertToPointerRoot and fix the focus if it's None or PointerRoot
2003-09-26 Padraig O'Briain <padraig.obriain@sun.com>
* src/Makefile.am: Add -DMETACITY_LIBDIR to support loading of modules
* src/main.c: Add functions find_accessibility_module,
accessibility_invoke_module and accessibility_invoke
(main); Check whether GConf accessibility key is true and if so
load accessibility modules. This code is based on the libgnome code.
src/tabpopup.c (meta_ui_tab_popup_new): Set accessible role of
accessible for label containing window name to STATUSBAR so
AT can be aware of window name.
This fixes bug #120025
2003-09-20 Rob Adams <readams@readams.net>
Fix bug where multiple entries could appear in MRU lists, or no
entry when sticking/unsticking windows. Fix for #122016
* src/window.c (meta_window_stick): use window->screen->workspaces
instead of window->workspaces.
(meta_window_unstick): use window->screen->workspaces instead of
window->workspaces.
2003-09-19 Rob Adams <readams@readams.net>
Fix a bug with partial-width panel struts caused by incorrect
computation of rectangle widths, and another when using different
screen resolutions on xineramas. See #122404. Also fix a crash
bug with the MRU list when sticking and unsticking windows. See
#120809.
* src/constraints.c (get_outermost_onscreen_positions): Fix
off-by-one error with partial-width struts.
* src/window.c (meta_window_update_struts): Fix off-by-one error
with partial-width struts.
(meta_window_stick): assign back to GList after g_list_append
(meta_window_unstick): assign back to GList after g_list_append
* src/workspace.c (ensure_work_areas_validated): For right and
bottom struts, compute strut relative to root window and not to
xinerama edge in compliance with EWMH recommendations.
2003-08-29 Rob Adams <robadams@ucla.edu>
* src/ui.c (meta_gdk_pixbuf_get_from_pixmap): harden against null
return from gdk_pixmap_foreign_new. Fix for #116923.
2003-08-20 Rob Adams <robadams@ucla.edu>
Complete the transition to using the MRU window as the default
focus window instead of the topmost window; fixes a number of
problems with sloppy focus and utility windows. See #112031.
* src/window.c (meta_window_free): call
meta_workspace_focus_mru_window
(meta_window_minimize): call meta_workspace_focus_mru_window
2003-08-20 Rob Adams <robadams@ucla.edu>
* src/constraints.c (meta_window_constrain): do northwest resize
when maximizing and fullscreening to avoid potential "off-by-one"
problems.
2003-08-19 Rob Adams <robadams@uclu.edu>
* src/stack.c (get_standalone_layer): put windows with
wm_state_below at the bottom. Make this higher priority than full
screen layer; see #120238.
2003-08-18 Rob Adams <robadams@ucla.edu>
* src/constraints.c (meta_window_constrain): recalculate frame
geometry if the window gets maximized after placement, since it's
likely to change. Fix for #120117.
2003-08-17 Ray Strode <halfline@hawaii.rr.com>
* src/delete.c (meta_window_delete): Use MRU list to find focusing
window after a window is deleted instead of using top window. Fix
for #108643.
2003-08-16 Havoc Pennington <hp@pobox.com>
Patch from Soeren Sandmann #108926 to improve opaque resize
* src/frame.c (meta_window_ensure_frame): new function
* src/ui.c (meta_ui_create_frame_window): new function to create
a frame with GDK, so that GDK's invalidation etc. work properly
2003-08-15 Ray Strode <halfline@hawaii.rr.com>
Changed MRU list to be per workspace instead of per display, so
sticky windows don't hijack the window focus after workspace
switching (Bug #97635).
* src/delete.c (meta_window_delete): Use
meta_workspace_focus_top_window instead of
meta_screen_focus_top_window.
* src/display.c (meta_display_open): Stop using display->mru_list.
(find_tab_forward):
(find_tab_backward):
(meta_display_get_tab_list): Use workspace->mru_list instead of
display->mru_list and remove unneeded calls to
meta_window_visible_on_workspace
* src/display.h: Remove mru_list from MetaDisplay
* src/keybindings.c (handle_toggle_desktop): Use
meta_workspace_focus_top_window instead of
meta_screen_focus_top_window.
* src/screen.c (meta_screen_focus_top_window):
(meta_screen_focus_default_window): Remove functions.
(meta_screen_show_desktop): Use meta_workspace_focus_top_window
instead of meta_screen_focus_top_window.
* src/screen.h: Remove meta_screen_focus_top_window and
meta_screen_focus_default_window declarations.
* src/window.c (meta_window_new): Stop using display->mru_list.
(meta_window_free): Use meta_workspace_focus_top_window
instead of meta_screen_focus_top_window and stop using
display->mru_list.
(meta_window_stick): Add sticky window to all workspace MRU lists.
(meta_window_unstick): Remove non-sticky window from the workspace
MRU lists it doesn't belong in.
(meta_window_notify_focus): Move newly focused window to the front
of active workspace's MRU list.
* src/workspace.c (meta_workspace_new): Initialize
workspace->mru_list to NULL.
(meta_workspace_add_window): Add window to workspace's MRU list.
(meta_workspace_remove_window): Remove window from workspace's MRU
list.
(meta_workspace_activate_with_focus): Use
meta_workspace_focus_default_window instead of
meta_screen_focus_default_window.
(meta_workspace_focus_default_window):
(meta_workspace_focus_mru_window):
(meta_workspace_focus_top_window): Add functions.
* src/workspace.h: Add mru_list to MetaWorkspace and add function
declarations for meta_workspace_focus_default_window,
meta_workspace_focus_mru_window, meta_workspace_focus_top_window.
2003-08-14 Rob Adams <robadams@ucla.edu>
Allow windows that are too tall for the workarea to break the
onscreen constraints just enough so that their bottom edges can be
made visible. Fix for #106740. Also, changes constraints to
constrain the resize and then the move to avoid complexities in
the code for the above fix.
* src/constraints.c (get_outermost_onscreen_positions)
Compute the "effective" height of the work area and the minimum
size for the window to compute a value by which a window is
allowed to violate the top constraint.
(meta_window_constrain): convert to a resize then a move instead
of a move then resize.
2003-08-10 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_new): don't select for button
press/release events, as that keeps other clients from doing so,
and it doesn't seem that metacity has any reason to do it.
Patch from Andreas Volz.
2003-08-08 Bastien Nocera <hadess@hadess.net>
* src/metacity-dialog.c: (kill_window_question),
(warn_about_no_sm_support): fix markup being ignored when a window
title has a forbidden character in it (eg. "Send & Receive")
* src/tools/metacity-window-demo.c: fix warning
2003-07-29 Arvind Samptur <arvind.samptur@wipro.com>
* src/xprops.c (utf8_list_from_results): Number of
strings we are processing is one more than required.
Also get the string count right even without a null byte at the end.
Pointed out by Havoc.
2003-07-27 Rob Adams <robadams@ucla.edu>
* src/window.c (update_move): Update window shaking loose so that
the window is moved to the pointer and certain drag state is
properly restored once windows "reattach". Fix for #115000 based
on the patch by Jurg Billeter.
* src/screen.c (meta_screen_resize): Invalidate work areas after
an xrandr screen size update. Fix for #117230.
* src/stack.c (window_is_fullscreen_size): Check the bottom corner
of the window in addition to the top corner. Fix for #118194.
* src/constraints.c (meta_window_constrain): Support aspect ratio
hints in the new constraints code. Fix for #113798.
* src/tools/metacity-window-demo.c (toggle_aspect_ratio): toggle
the aspect ratio hints to force a 16:9 aspect ratio.
(do_appwindow): add a button to toggle aspect ratio.
2003-07-27 Havoc Pennington <hp@pobox.com>
* src/theme-viewer.c (run_theme_benchmark): also measure wall
clock time, and run over a number of window sizes.
2003-06-20 Rob Adams <robadams@ucla.edu>
* src/window.c (meta_window_unmaximize): Update grab state when we
unmaximize so double-clicking doesn't cause weird window-jumping
problems. See #116292.
2003-06-26 Havoc Pennington <hp@pobox.com>
* src/workspace.c (meta_workspace_invalidate_work_area): nuke the
lists of struts here, to improve confidence that we never try to
use them after a window with rects in the list gets freed.
(it wasn't broken before I don't think, just making the
code more robust against future mods)
* src/window.c (meta_window_update_struts): replace magic "75"
with a macro
* src/constraints.c (constraint_hints_applies_func): don't apply
hints to maximized or fullscreen, rather than only fullscreen
(constrain_move): add paranoia max number of iterations to the
heuristic loop
2003-06-26 Rob Adams <robadams@ucla.edu>
Add keybinding to allow the user to toggle _NET_WM_STATE_ABOVE on
windows. Disabled by default. See #98387.
* src/keybindings.c (handle_toggle_above): new function implements
the keybinding
* src/metacity.schemas.in: add toggle_above keybinding
* src/prefs.[ch]: add toggle_above keybinding
* src/window.[ch] (meta_window_make_above): new function to put a
window into the above state
(meta_window_unmake_above): new function takes a window out of the
above state
2003-06-10 Rob Adams <robadams@ucla.edu>
Update constraints code to support the new _NET_WM_STRUT_PARTIAL
EWMH draft specification. See #86682. Also, fix a bug involving
work area invalidation on metacity startup. Fix for #108497.
Finally, some minor fixes for full screen windows.
* src/window.h: Add new MetaStruts structure to store strut rects
for a window. Remove has_struts and do_not_cover flag, and
support new MetaStruts instead of the four ints.
* src/window.c (meta_window_new): change initialization to work
with new struts. Also, move meta_window_update_struts call to
after the workspaces are initialized to fix#108497. Remove
do_not_cover and related code.
(process_property_notify): add strut_partial
(update_struts): change function name to meta_window_update_struts
and expose in external MetaWindow API. Support partial width
struts and the new strut rects.
* src/workspace.h: add new GSLists containing pointers to all
relevant struts for this workspace.
* src/workspace.c (meta_workspace_new): initialize the list of
strut rects for this workspace.
(meta_workspace_free): free the strut rect lists
(ensure_work_areas_validated): support new struts and new strut
rect lists. Unleash the per-xinerama work areas.
* src/constraints.c (get_outermost_onscreen_positions): Use the
current window position along with the new per-workspace strut
rects to compute the constraints that apply to a particular
window.
(constraint_hint_applies_func): don't do hints constraints on
fullscreen windows
(update_position_limits): for maximized windows use the work areas
to set the position limits; for other windows rely on the struts
constraints to be computed later in
get_outermost_onscreen_positions
(meta_window_constrain): don't apply aspect ratio hints to full
screen windows
* src/display.c (meta_display_open): add _NET_WM_STRUT_PARTIAL atom
(meta_rectangle_equal): new helper function for MetaRectangles
(event_queue_callback): #ifndef out if USE_GDK_DISPLAY not set to
avoid compiler warning
* src/display.h: add atom_net_wm_strut_partial, and add
meta_rectangle_equal.
* src/screen.c (meta_screen_rect_intersects_xinerama): change
_window_intersects_ to _rect_intersects_ which is more useful now.
(meta_screen_resize_func): update struts on windows with struts
since struts are relative to the screen size, and this function is
called when the screen size updates.
* src/screen.h (meta_screen_rect_intersects_xinerama): change
_window_intersects_ to _rect_intersects_ which is more useful now.
* src/window-props.c (meta_display_init_window_prop_hooks): add
hook for strut_partial
* src/tools/metacity-window-demo.c: Support partial-width struts
on the dock window tests for metacity testing purposes.
2003-06-12 Rob Adams <robadams@ucla.edu>
Remove legacy support for Gnome 1 hints, since we deem it unlikely
that anyone is running a current metacity with Gnome 1. The
removed hints are _WIN_WORKSPACE, _WIN_LAYER, _WIN_PROTOCOLS,
_WIN_SUPPORTING_WM_CHECK, and _WIN_HINTS.
* display.c (meta_display_open): remove hints
* display.h: remove atoms for hints
* screen.c (set_wm_check_hint): don't set legacy hint
(set_supported_hint): don't set legacy hint
* window-props.c (init_win_workspace): removed
(reload_win_workspace): removed
(meta_display_init_window_prop_hooks): remove hints
* window.h: remove do_not_cover flag
* window.c: remove GnomeWinHints enum
(recalc_do_not_cover_struts): removed
(meta_window_new): don't initialize removed flags or compute
legacy struts
(move_resize_cmp): removed
(idle_move_resize): Don't bother sorting the idle queue
(meta_window_client_message): don't set legacy hint
(process_property_notify): remove hints
(update_net_wm_type): don't fall back to WIN_LAYER hint
(update_struts): remove legacy struts
2003-06-12 Havoc Pennington <hp@pobox.com>
* src/display.c (event_callback): make raise-on-click explicitly
only happen in click to focus mode.
* src/window.c (update_move): apply patch from Jurg Billeter to
allow you to "shake loose" maximized windows and move them between
Xinerama heads. #93586
* src/display.c: delete event_queue_callback
* src/display.h (struct _MetaDisplay): get rid of
grab_current_window_pos and grab_current_root_[xy] as I could find
absolutely no code using them for anything. They were just sort of
randomly assigned to for no apparent reason.
* src/display.c (event_callback): double-click timeout is per
screen, so get the screen and pass screen->ui to
meta_ui_get_double_click_timeout()
* src/ui.c (meta_ui_get_double_click_timeout): take a MetaUI
argument so we get the right settings for each screen
(meta_ui_get_drag_threshold): new function
2003-06-09 Rob Adams <robadams@ucla.edu>
Revamp placement policy for windows that are maximized when they
are mapped, including windows that set a hint to be maximized or
windows that are auto-maximized using our heuristic. See #111902.
* src/window.h: add new flag maximize_after_placement and new
function meta_window_maximize_internal.
* src/window.c (meta_window_new): initialize
maximize_after_placement to FALSE and remove the automaximize
heuristic.
(meta_window_maximize_internal): new function accepts a saved_rect
argument to be used as the new saved_rect for the window, and does
not queue a move_resize.
(meta_window_maximize): re-implement using
meta_window_maximize_internal.
(update_net_wm_state): If a window has a maximize hint set on
startup set maximize_after_placement to TRUE
* src/constraints.c (meta_window_constrain): Update the xinerama
information in the ConstraintInfo after placing the window, and
maximize the window after placement if
window->maximize_after_placement
* src/place.c (find_first_fit): take a natural xinerama list as an
argument instead of generating it here
(constrain_placement): remove function, since it is no longer
needed
(meta_window_place): generate the natural xinerama list here and
pass it into find_first_fit. If find_first_fit fails, use the
list to find empty xineramas where we can place windows that may
be maximized later. This makes maximized windows follow the
correct placement policy. Move the automaximize heuristic here.
2003-06-09 Rob Adams <robadams@ucla.edu>
* src/metacity-dialog.c (warn_about_no_sm_support): install an
alarm to timeout the no-sm-dialog after 4 minutes of inactivity.
Patch from Ximian. See #114789.
2003-06-07 Rob Adams <robadams@ucla.edu>
* src/window.c (meta_window_new): call meta_group_compute_group
after setting window->desc to avoid SIGSEGV when verbose mode is
enabled.
2003-06-07 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_notify_focus): drop the mouse button
grabs for the focused window; we'll see if this breaks anything.
It should fix#102209
2003-06-04 Rob Adams <robadams@ucla.edu>
* src/window.c (meta_window_new): don't be stupid and set
window->group = NULL after calling meta_window_compute_group.
* src/group.c (meta_window_get_group): assert that window->group
!= NULL in here instead of computing the group to ensure
robustness.
2003-06-04 Rob Adams <robadams@ucla.edu>
Precompute groups to guarantee that meta_group_list_windows always
returns the correct list of windows. See Bug #96973
* src/window.h: change cached_group variable to group
* src/window.c (meta_window_new): change cached_group to group and
call meta_window_compute_group
* src/groups.c (meta_window_get_group): simply return
window->group rather than computing it and returning
window->cached_group
(meta_window_compute_group): new function computes window->group.
Designed to be called once from meta_window_new
(remove_window_from_group): change cached_group to group
(meta_window_group_leader_changed): call meta_window_compute_group
instead of meta_window_get_group
2003-06-04 Rob Adams <robadams@ucla.edu>
Precompute groups to guarantee that meta_group_list_windows always
returns the correct list of windows. See Bug #96973
* src/window.h: change cached_group variable to group
* src/window.c (meta_window_new): change cached_group to group and
call meta_window_compute_group
* src/groups.c (meta_window_get_group): simply return
window->group rather than computing it and returning
window->cached_group
(meta_window_compute_group): new function computes window->group.
Designed to be called once from meta_window_new
(remove_window_from_group): change cached_group to group
CVS2003-05-29 Rob Adams <robadams@ucla.edu>
Use a new property _METACITY_SENTINEL to eliminate a race
condition that causes focus to behave badly with sloppy/mouse
focus when lots of windows are mapped/unmapped, such as with a
workspace switch. The EnterNotify events on a display are ignored
until the PropertyNotify sent after all the window maps is
received. This is a fix for #110970.
* src/display.[ch]: New _METACITY_SENTINEL atom.
(event_callback): ignore EnterNotify if the sentinel isn't clear,
and decrement the sentinel counter when the PropertyNotify is
received.
(meta_display_increment_focus_sentinel): new function. Increments
the sentinel counter and updates the property on a root window on
this display.
(meta_display_decrement_focus_sentinel): Decrement the sentinel
counter.
(meta_display_focus_sentinel_clear): returns whether the sentinel
counter is zero.
* src/window.c (idle_calc_showing): after showing windows, call
meta_display_increment_focus_sentinel on each display for windows
to be shown.
* src/workspace.[ch] (meta_workspace_activate_with_focus): new
function activates a workspace and focuses a particular window
after the workspace is activated.
(meta_workspace_activate): now just a wrapper for
meta_workspace_activate_with_focus
* src/keybindings.c: use new meta_workspace_activate_with_focus
function to ensure that focus will follow the focused window
through the workspace switch.
: ----------------------------------------------------------------------
2003-05-29 Havoc Pennington <hp@redhat.com>
* src/theme-parser.c (meta_theme_load): s/int/gsize/ for
g_file_get_contents() (found independently by
marcus@freebsd.org on SPARC and James Laska on s390x;
#113661
* src/main.c (main): fix theme location mentioned in error message
2003-05-29 Ray Strode <halfline@hawaii.rr.com>
Get and use double-click speed from GtkSettings (Bug #103218).
* src/ui.c, src/ui.h:
add function meta_ui_get_double_click_timeout for looking up
the global double-click speed.
* src/display.c, src/display.h: remove double_click_time
field from MetaDisplay and use meta_ui_get_double_click_timeout
instead.
2003-05-29 Rob Adams <robadams@ucla.edu>
* src/main.c (main): chdir to the user's home directory on
startup. See #113755.
* src/stack.c (get_standalone_layer): a window should be in the
fullscreen layer if it or any of its transient descendants are
focused or expecting the focus and it is either fullscreen or
fullscreen sized. Fix for #104369.
* src/stack.c (is_focused_foreach): foreach used by
get_standalone_layer to find focused transient descendants.
2003-05-20 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (meta_change_keygrab): the mask
display->ignored_modifier_mask wasn't being bound,
due to "<" instead of "<=" (most people didn't notice
as display->ignored_modifier_mask included Scroll_Lock).
Red Hat bugzilla #91301 reported by Youssef Makki
* src/display.c (meta_change_button_grab): make corresponding
change for button grabs.
2003-05-20 Anders Carlsson <andersc@codefactory.se>
* src/metacity-dialog.c: (kill_window_question):
Split up the strings to make life easier for translators.
2003-05-18 Havoc Pennington <hp@pobox.com>
* src/window.c (unminimize_window_and_all_transient_parents):
revert broken change that assumed foreach_ancestor iterated
over the window itself. Andrew Sobala, Rob Adams,
#113232
`
2003-05-16 Rob Adams <robadams@ucla.edu>
Flip the workspace when using up/down/left/right for move window
to, but not when specifying a workspace explicitly as in move to
workspace 4. Possible fix for #105492.
* src/keybindings.c (do_handle_move_to_workspace): new function
moves a window to a workspace with the option to flip to that
workspace.
(handle_move_to_workspace): Use new do_handle_move_to_workspace
function without flipping (a keybinding)
(handle_move_to_workspace_flip): Use new
do_handle_move_to_workspace function with flipping (a keybinding)
2003-05-16 Havoc Pennington <hp@redhat.com>
* src/frames.c (meta_frames_paint_to_drawable): fix for
bug #104018 from David Santiago, change button state to
normal while it's being pressed if you move the mouse
outside it. Do this by tracking prelit_control for whether
to draw a button as active, not just for whether to draw
it as prelit.
(meta_frames_motion_notify_event): also update prelit_control
while clicking a button
2003-05-16 Havoc Pennington <hp@redhat.com>
* src/window.c (meta_window_new): fill in window->desc sooner
since we use it sooner now.
* src/display.c (meta_display_open): init
display->grab_update_alarm
* src/window.c (meta_window_new): initialize the always_sticky
field
(meta_window_new): initialize the update_icon_queued field
Patch from Julien Olivier bug #92335 for converting "show desktop
mode" to "all windows are minimized" when you open a new window,
instead of just mapping all the windows again.
* src/window.c (meta_window_activate): minimize all windows before
coming out of show desktop mode.
(meta_window_unminimize): don't toggle show desktop mode here
* src/screen.c (meta_screen_minimize_all_except): new function
2003-05-03 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (handle_move_to_workspace): when moving
window to another workspace, don't switch to that workspace.
* src/window.c (menu_callback): when moving window to another
workspace, don't switch to that workspace.
2003-05-01 Rob Adams <robadams@ucla.edu>
* src/constraints.c (constraint_onscreen_applies_func): Don't
apply onscreen constraints to full screen windows. Fix for
#110048
2003-04-05 Rob Adams <robadams@ucla.edu>
Update placement policy for screen with multiple xineramas.
Windows will be placed preferentially on the xinerama with the
pointer, and progressively further away as needed to find a place
where the window does not overlap other windows.
* src/place.c (rect_fits_in_work_area): function
fit_rect_in_xinerama greatly simplified to work with new placement
policy.
(find_first_fit): implement new first first placement scheme
* src/screen.c (meta_screen_get_xinerama_neighbor): look for an
xinerama in the xinerama list that is adjacent to the specified
xinerama.
(meta_screen_get_natural_xinerama_list): return a list of
xineramas in the order to be preferred by the placement algorithm
as determined by the current location of the pointer.
* src/screen.h: add function prototypes and an enum used by
meta_screen_get_xinerama_neighbor.
2003-03-30 Rob Adams <robadams@ucla.edu>
* src/window.c (meta_window_move_resize_internal): When passing
frame geometry to meta_window_constrain, send null if no frame.
Possible fix for #109039.
2003-03-29 Havoc Pennington <hp@pobox.com>
* src/wm-tester/test-gravity.c (main): add --noframes option for
testing, showing how broken we currently are.
Fri Mar 28 14:13:37 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* src/window.c (update_resize): Only cap refresh rate when not
using SYNC. Remove bogus update-if-we-moved-more-than-a-delta.
* src/window.c (update_move): Don't cap refresh rate during
moves. Remove bogus update-if-we-moved-more-than-a-delta.
2003-03-11 Havoc Pennington <hp@pobox.com>
Should fix#108108, #106217, tracked down by Owen Taylor and
Frederic Crozat
* src/window.c (meta_window_foreach_transient): change
MetaWindowForeachFunc to return a boolean for whether to continue
(meta_window_foreach_ancestor): new function
(window_should_be_showing): use meta_window_foreach_ancestor
(unminimize_window_and_all_transient_parents): ditto
(update_sm_hints): ditto
(meta_window_is_ancestor_of_transient): ditto
* src/stack.c (get_maximum_layer_of_ancestor): use
meta_window_foreach_ancestor
2003-03-16 Rob Adams <robadams@ucla.edu>
* window.c (meta_window_show_menu): Free old window menu if it
already exists so we don't end up with more than one. Fix for
#108392.
2003-03-14 Rob Adams <robadams@ucla.edu>
* contraints.c (get_outermost_screen_positions): Don't try to
force a window onscreen by more than its width. Fix for #94815.
2003-03-13 Rob Adams <robadams@ucla.edu>
Make it so that the alt-tabbing won't try to go to a minimized
window by default. Fix for #107071.
* display.c (meta_display_get_tab_list): use a GList instead of a
GSList
(meta_display_get_tab_next): use meta_display_get_tab_list to
decide what the next/previous tab window should be.
* display.h (meta_display_get_tab_list): update function prototype
to return GList instead of GSList.
* screen.c (meta_screen_ensure_tab_popup): update function to deal
with GList returned by meta_display_get_tab_list instead of GSList.
2003-03-11 Rob Adams <robadams@ucla.edu>
* src/constraints.c (meta_window_constrain): include left frame
geometry when maximizing or fullscreening windows. Fix for
#108127.
2003-02-27 Havoc Pennington <hp@redhat.com>
Switch over to new constraints code, unquestionably introduces
some bugs, but should get us on the right path.
* src/window.c (meta_window_get_work_area_all_xineramas): create
this function again as it turned out to be legitimate for window
position constraint
(adjust_for_gravity): use the width/height from the configure
request to compute the requested move
(meta_window_move_resize_internal): use meta_window_constrain
(update_size_hints): clamp max size to MAXSHORT to avoid worrying
about overflow stuff
* src/constraints.c (meta_window_constrain): don't base placement
on uninitialized variables, general hacking
* src/Makefile.am (metacity_SOURCES): add constraints.c,
constraints.h
* src/constraints.c (meta_window_constrain): update the
cut-and-paste aspect ratio code to have latest bugfixes
2003-03-08 Rob Adams <robadams@ucla.edu>
* src/window-props.c (reload_normal_hints): Check that window min
and max size hints are at least 1. Fix for #107110.
2003-02-27 Havoc Pennington <hp@pobox.com>
* src/main.c (main): add more debug spew about conditional
build stuff
(main): panic to "Simple" theme
* src/window.c, src/window-props.c: move WM_NORMAL_HINTS and
WM_PROTOCOLS to new property system; don't queue move resize on
updating WM_PROTOCOLS; move WM_HINTS to new property system;
reload icon in an idle handler.
Changes made on plane from FOSDEM, syncing from laptop.
2003-02-28 Mark McLoughlin <mark@skynet.ie>
Give me back my keys.
* src/keybindings.c: (meta_window_grab_keys): don't
grab keys on DOCK windows.
* src/window.c: (recalc_window_type): re-grab the
keys.
2003-02-26 Mark McLoughlin <mark@skynet.ie>
* src/keybindings.c: (handle_panel_keybinding): release
the keyboard grab before sending the action message to
the panel.
2003-02-24 Mark McLoughlin <mark@skynet.ie>
Take control of the panel's global keybindings. The
screenshot utility is hooked up using a special case
run_command and the menu and run dialog bindings are
done using the _GNOME_PANEL_ACTION ClientMessage
protocol.
* src/display.[ch]: (meta_display_open): add some atoms.
* src/keybindings.c:
(handle_panel_keybinding): impl to handle a keybinding
by sending an action message to the panel.
* src/metacity.schemas.in: add schemas for the panel and
screenshot keybindings and the screenshot commands.
* src/prefs.[ch]: (update_command),
(meta_prefs_get_gconf_key_for_command): impl special case
handling for the screenshot commands. They are stored at
the the end of the commands array but have named keys.
2003-02-22 Rob Adams <robadams@ucla.edu>
* src/metacity.schemas.in: change toggle_maximized to
toggle_maximize and toggle_shaded to toggle_shade in
action_double_click_titlebar long description to match the values
used by metacity
* po/*.po: change toggle_maximized to toggle_maximize and
toggle_shaded to toggle_shade in action_double_click_titlebar long
description to match the values used by metacity
2003-02-23 Havoc Pennington <hp@pobox.com>
Patch from Rob Adams addresses #95014 (placement issues),
makes first fit algorithm "center tile", adds most code
for per-xinerama workspaces (#86682) but disables it for now.
* src/workspace.c (meta_workspace_get_work_area_for_xinerama)
(meta_workspace_get_work_area_all_xineramas): new xinerama
functions, maintain workspace->work_areas with a different
work area for each xinerama. However for now all the work
areas are the same, because haven't quite figured out how
_NET_WM_STRUT is supposed to work
* src/window.c: adapt to new meta_window_* xinerama APIs
(meta_window_get_work_area_current_xinerama): new xinerama
API
(meta_window_get_work_area_for_xinerama): new xinerama API
(constrain_position): be a bit more clever about which xinerama's
work area we choose to use.
* src/stack.c: adapt to new Xinerama API
* src/screen.c (reload_xinerama_infos): invalidate all work areas
(meta_screen_get_xinerama_for_rect): new function
(meta_screen_window_intersects_xinerama): new function
* src/place.c (find_first_fit): change to use
"center tiling" (center a screen full of tiled windows,
rather than aligning them top left). Adapt to new
xinerama functions.
2003-02-22 Rob Adams <robadams@ucla.edu>
* window.c (set_wm_state): modify comment to explain why the icon
window element is set to None. Fix for #97357 thanks to Gregory
Merchan.
2003-02-22 Havoc Pennington <hp@pobox.com>
* src/display.c (event_callback): fix to unfocus window only when
you leave the window frame, not when you leave the window itself,
unless window has no frame. #100248 fix from Orien Vandenbergh
2003-02-22 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_get_tab_next): when tabbing
backward, we are still tabbing *from* the most recently used
window, not from the least recently used window.
* src/keybindings.c (struct _MetaKeyBinding): make keycode
unsigned to match XEvent
Patch for #84999 based on patch from Mark McLoughlin
* src/prefs.c: add an add_shift field to MetaKeyPref to
add shift when grabbing the given keybinding.
* src/keybindings.c (rebuild_screen_binding_table)
(rebuild_window_binding_table): refactor to share code,
and honor add_shift field in MetaKeyPref
2003-02-20 Havoc Pennington <hp@redhat.com>
* src/stack.c (create_constraints): don't create constraints
between windows on different screens, #106086 tracked down
by Arvind
2003-02-14 Arvind Samptur <arvind.samptur@wipro.com>
* src/screen.c: (meta_screen_new) : Update the workspace
names from gconf and set the NET_DESKTOP_NAMES atom.
Renamed update_workspace_names() to set_workspace_names().
Fixes#105498
2003-02-04 Havoc Pennington <hp@redhat.com>
* src/themes/Simple/ChangeLog: nuke subdir ChangeLog,
there can be only one true ChangeLog.
2003-01-30 Havoc Pennington <hp@redhat.com>
* src/keybindings.c (process_event): match handlers to key events
using key codes, not key syms
Thu Jan 30 22:55:16 2003 Jonathan Blandford <jrb@redhat.com>
* src/themes/Makefile.am (THEMES): add Simple to the list of
themes.
* src/metacity.schemas.in: change default theme to Simple.
2003-01-29 Havoc Pennington <hp@pobox.com>
* src/menu.c (meta_window_menu_new): don't create workspaces
menu items if only 1 workspace. Fix for #101952 from
Orien Vandenbergh
2003-01-25 Havoc Pennington <hp@pobox.com>
* src/stack.c (window_is_fullscreen_size): When checking if a
window is fullscreen size, only require it to be at the origin
of the work area, not at the origin of the screen/xinerama.
Still require it to be full screen in width x height.
May fix xine in the case where the user has a top panel.
* src/window.c (constrain_position): restore the ability for
undecorated windows to position themselves overlapping the top
panel, but don't let decorated windows do so. Oh the hacks...
2003-01-08 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_apply_startup_properties): small code
snippet to fix startup sequences that set legacy class/name
2003-01-22 Havoc Pennington <hp@redhat.com>
* src/async-getprop.c (async_get_property_handler): do not read
sizeof(long) off the X connection. The X protocol does not vary
by architecture. Fixes longstanding hang on all 64-bit platforms.
2003-01-22 Havoc Pennington <hp@pobox.com>
* src/window.c (update_struts): be robust against the panel's
lame "set a negative number for struts" thing, even though
we'll also fix the panel.
2003-01-21 Havoc Pennington <hp@pobox.com>
Fix for the "mangles focus window when switching workspaces
and using mouse focus" bug
* src/stack.c (meta_stack_get_default_focus_window_at_point): new
function
* src/screen.c (meta_screen_focus_mouse_window): new function
(meta_screen_focus_default_window): new function
* src/workspace.c (meta_workspace_activate): use the
new meta_screen_focus_default_window()
2003-01-17 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_handle_mouse_grab_op_event): fix event
compression code to use GDK algorithm suggested by Owen, should be
more efficient.
2003-01-21 Havoc Pennington <hp@redhat.com>
* src/display.c (event_callback): only hop window to the current
workspace if the window was previously minimized. Should keep
mozilla from popping windows over to your current workspace.
2003-01-20 Havoc Pennington <hp@redhat.com>
Attempt to fix#85916
* src/keybindings.c (primary_modifier_still_pressed): new function
(handle_workspace_switch): handle modifier release prior to
getting the grab
(do_choose_window): handle modifier release prior to getting the
grab
* src/keybindings.c (grab_keyboard): properly return failure
if the GrabKeyboard doesn't work
2003-01-14 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_maximize, meta_window_unmaximize)
(meta_window_make_fullscreen, meta_window_unmake_fullscreen):
recalc_window_features() after making these changes, should fix
#103317
2003-01-14 Rob Adams <robadams@ucla.edu>
* src/prefs.c: Increase the number of run_command bindings in
screen_bindings from 12 to 32.
* src/prefs.h: Increase the number of META_KEYBINDING_COMMAND_N
macros from 12 to 32.
* src/keybindings.c: Increase the number of run_command handlers
from 12 to 32.
2003-01-11 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_handle_mouse_grab_op_event): implement
compression of motion events (drop all but the most recently
received), guessing at fixes for #103009
2003-01-09 Havoc Pennington <hp@redhat.com>
* src/window.c (recalc_window_features): argh, we were making all
dialogs skip taskbar; when did that get added. Fix to match
libwnck, only skip taskbar when the dialog is transient for some
other app window.
2003-01-09 Havoc Pennington <hp@redhat.com>
* src/metacity.schemas.in: change Windows+click back to Alt+click,
Windows+click just surprised everybody and didn't work half the
time. Maya users can configure it, and GTK DND can change its
default.
2003-01-06 Arvind Samptur <arvind.samptur@wipro.com>
* src/window.c: (constrain_position) don't apply
offscreen height difference. This would get the
window under the panel on a resize or a move.
Fixes#102418
2003-01-05 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_calc_workspace_layout): invert
vertical_workspaces cases (we want to go down each column if
it's vertical, and across each row if horizontal). Patch
from readams@hmc.edu
2003-01-05 Havoc Pennington <hp@pobox.com>
* src/frames.c (meta_frames_apply_shapes): put in the
HAVE_GTK_MULTIHEAD conditionals so we build with GTK 2.0
2003-01-05 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_show): focus new windows even in
mouse focus mode, #89981, patch from readams@hmc.edu
2003-01-05 Havoc Pennington <hp@pobox.com>
* src/workspace.c (meta_workspace_get_neighbor): redo using new
calc_workspace_layout to fix#98302
* src/util.c (topic_name): shorten default prefix
* src/screen.c (meta_screen_calc_workspace_layout): enhance this
to handle all the funky layouts and calculate more information
than before
2003-01-05 Havoc Pennington <hp@pobox.com>
* src/frames.c (meta_frames_apply_shapes): handle
the client having a shape mask, fixes#101806
* src/core.c (meta_core_get_client_xwindow): new function
* src/frame.c, src/frame.h: keep a flag for whether we need to
update the frame shape
* src/window.c (meta_window_new): select for ShapeNotify
* src/display.h, src/display.c: actually query the shape
extension, instead of just using it all over the place.
* src/prefs.c (update_application_based): don't let people turn on
application_based, as it just causes funky bugs. We can reenable
the pref when/if it ever does something useful.
2003-01-03 Havoc Pennington <hp@redhat.com>
* src/display.c: include the Xrandr header file
* src/window.c (meta_window_fill_horizontal)
(meta_window_fill_vertical): maximize to work area, not entire
screen. doh.
2002-12-18 Havoc Pennington <hp@redhat.com>
* src/window.c (meta_window_new): select ColormapChangeMask
on toplevel windows, maybe a partial fix for #101478
2002-12-17 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_begin_grab_op): don't use "(null)"
for null pointers, use "none", so I can distinguish
glibc-generated (null) which is a bug.
(key_event_description): ditto
(meta_display_begin_grab_op): ditto
* src/window.c (update_sm_hints): ditto
* src/keybindings.c (reload_modmap): ditto
(meta_display_process_key_event): ditto
2002-12-16 Havoc Pennington <hp@pobox.com>
* src/window-props.c: use META_PROP_VALUE_STRING_AS_UTF8 so
we convert old Latin-1 WM_NAME to UTF-8
* src/xprops.h (enum): add META_PROP_VALUE_STRING_AS_UTF8 to get a
latin1 string then convert.
2002-12-15 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_new): get window name before anything
else.
* src/xprops.c (validate_or_free_results): instead of suggesting
how to get window title etc. with xprop, just print out the
window title. much better.
2002-12-15 Havoc Pennington <hp@pobox.com>
* src/xprops.c (validate_or_free_results): make the warning about
strange property contents blame the application and explain how to
use xprop to diagnose which app is causing the problem.
2002-12-13 Havoc Pennington <hp@redhat.com>
* src/tools/Makefile.am (Desktop_in_files): only install .desktop
file for metacity-properties if we actually install
metacity-properties
* src/display.c (event_callback): not focusing on button 2 click
was crack, revert that change.
2002-12-09 Havoc Pennington <hp@pobox.com>
* AUTHORS: add myself here, bug #100789
* src/display.c (meta_display_set_grab_op_cursor): drop
PointerMotionHintMask
* src/window.c (meta_window_handle_mouse_grab_op_event): don't use
XQueryPointer, as we aren't using PointerMotionHint now
* src/display.c (event_callback): rearrange a bit of code
for slight speedup and clarity
* src/window.c (update_resize)
(meta_window_handle_mouse_grab_op_event): implement
usage of the _METACITY_UPDATE_COUNTER
(meta_window_handle_mouse_grab_op_event): fix code that
used event->xbutton with a motion event
* src/display.c (meta_display_open): add new atoms, and
initialize Xsync if we have it
(grab_op_is_resizing): new function
(meta_display_begin_grab_op): create an alarm monitoring
window's _METACITY_UPDATE_COUNTER
(meta_spew_event): conditionalize this on WITH_VERBOSE_MODE
and print alarm events.
* src/window.c (meta_window_new): fetch _METACITY_UPDATE_COUNTER
* configure.in (HAVE_XSYNC): check for Xsync extension
2002-12-08 Havoc Pennington <hp@pobox.com>
* README: updates
* src/window.c (MAX_RESIZES_PER_SECOND): change to 20 instead of
30, just as an experiment.
(MOVE_THRESHOLD): change 15 to 20
(RESIZE_THRESHOLD): change 15 to 20
* src/util.c (ensure_logfile): kill this function when verbose
mode is disabled.
2002-12-08 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_fill_vertical)
(meta_window_fill_horizontal): new functions to resize to
fill screen
* src/keybindings.c: add vert, horiz maximize
* src/prefs.c: had vert, horiz maximize
* src/metacity.schemas.in: shorten some overlong short
descriptions that make the keybindings capplet look ugly.
Add maximize_vertically, maximize_horizontally keys.
2002-12-08 Havoc Pennington <hp@pobox.com>
* src/prefs.c (meta_prefs_get_application_based): make this always
return FALSE for now, to avoid bug reports.
* src/util.c (ensure_logfile): put "opened log file" message on
stderr so it will normally land in ~/.xsession-errors
* configure.in: remove extra AC_ARG_PROGRAM
* src/display.c (event_callback): handle the toggle-verbose message
* src/tools/metacity-message.c: add a toggle-verbose message, been
meaning to do this for a while.
* src/util.c (meta_set_verbose): if verbose mode is enabled and we
don't support it, then exit.
* src/prefs.c: allow building without gconf (currently means some
prefs are no-ops)
* src/util.c, src/util.h: support defining macros to
kill all verbose output entirely. (Removes the code and strings
associated with it)
* configure.in: don't get METACITY_PROPS_LIBS if not building the
config dialog.
(HAVE_GCONF): allow building sans gconf, if you are size-sensitive
and not using gnome.
(WITH_VERBOSE_MODE): add ability to disable all the verbose debug
spew strings, to shrink the binary.
(--disable-sm): allow SM support to be forced on or off
(--disable-startup-notification): allow forcing this on or off
* src/window.h (META_WINDOW_IN_NORMAL_TAB_CHAIN,
META_WINDOW_IN_DOCK_TAB_CHAIN) : never use a window with input =
FALSE take_focus = FALSE in the normal and doc tab chains #90409
2002-12-01 Havoc Pennington <hp@pobox.com>
* src/frames.c (get_control): rearrange this function a bit, so
that we return CONTROL_TITLE for anything above the bottom of the
titlebar, in the fallback case where no other control was found.
Also, don't return RESIZE_N for title rect above the top resize
size, unless the window is resizable.
(meta_frames_button_press_event): only start a move when clicking
control TITLE, not control NONE. This way you don't start moving
a nonresizable window if you click its edges.
2002-12-01 Havoc Pennington <hp@pobox.com>
* src/tools/Makefile.am: conditionalize building the config dialog
* configure.in (BUILD_CONFIG_DIALOG): add --enable-config-dialog
option to turn on the "window focus" dialog. This is part of
deprecating this dialog.
2002-11-30 Havoc Pennington <hp@pobox.com>
* src/screen.c (STARTUP_TIMEOUT): lengthen to 15 seconds
* src/util.c (utf8_fputs): hmm, return a value
* src/screen.c (meta_screen_apply_startup_properties): new
function to apply initial workspace based on startup sequence.
* src/window.c (meta_window_new): load _NET_STARTUP_ID
(meta_window_get_startup_id): new function
* src/window-props.c (meta_display_init_window_prop_hooks): add
hooks for _NET_STARTUP_ID
* src/display.c (event_callback): send property events to
groups.
* src/xprops.c (meta_prop_get_values): make a type of INVALID
mean to ignore that property (don't fetch its value).
* src/group.c (meta_group_property_notify): new function
* src/screen.c (set_supported_hint): support _NET_STARTUP_ID
* src/display.c (meta_display_open): add _NET_STARTUP_ID to atoms
we initialize
* src/group-private.h: private header shared between
group-props.c, group.c
* src/group-props.h, src/group-props.c: new files to contain
functions for retrieving group properties
* src/window.c (meta_window_same_application): change this a bit
to work with new definition of group
* src/group.c (meta_window_get_group): always create a group for
every window, using the window's own ID as group leader if
required.
* src/window.c (update_wm_hints): handle changes to group leader
* src/group.c (meta_window_group_leader_changed): new function
* src/display.h (struct _MetaDisplay): _NET_WM_WINDOW_TYPE_SPLASH,
not SPLASHSCREEN. Reported by Gregory Merchan and Matthias Clasen.
* src/screen.c (startup_sequence_timeout): when timing out a
startup sequence, send a remove message, don't just time it out
locally.
2002-11-22 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_change_workspace): patch from
Hidetoshi Tajima to move a window's transients when moving
the window between workspaces. #98900
2002-11-21 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_open): init ret_to to
RevertToPointerRoot out of sheer paranoia; don't want no
RevertToNone in my code!
2002-11-20 Havoc Pennington <hp@pobox.com>
* src/window-props.c (set_icon_title): remove unused variable
* src/screen.c (meta_screen_new): read an existing
_NET_CURRENT_DESKTOP and restore it if set. Makes a restart even
less visible.
* src/workspace.c (set_active_space_hint): don't set the hint
during the process of unmanaging a screen
2002-11-19 Havoc Pennington <hp@pobox.com>
Should really fix#98303
* src/prefs.c (meta_prefs_change_workspace_name): add
bad hack to treat empty string the same as null
* src/menu.c (get_workspace_name_with_accel): allocate one more
than the length of "name" so we have room for a nul byte (and
don't malloc(0) on empty strings). Also some formatting cleanups.
2002-11-19 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_client_message): do a
recalc_window_features after setting new wm_state in order
to update skip_pager in addition to wm_state_skip_pager
(set_net_wm_state): base _NET_WM_STATE on skip_pager not
wm_state_skip_pager, ditto for skip_taskbar
2002-11-19 Havoc Pennington <hp@pobox.com>
Fix#98303 and assorted cleanup
* src/prefs.c (meta_preference_to_string): handle
META_PREF_WORKSPACE_NAMES
* src/menu.c (get_workspace_name_with_accel): assert that the
workspace has a name
* src/screen.c (meta_screen_ensure_workspace_popup): assert that
we got a workspace name
(meta_screen_ensure_workspace_popup): assert that we got a
workspace name
* src/prefs.c (update_workspace_name): fix screwiness (strcmp with
a freed string, assorted bad logic)
(init_workspace_names): assert that we filled in a default
workspace name
(meta_prefs_get_workspace_name): assert non-NULL workspace name
2002-11-12 Havoc Pennington <hp@redhat.com>
* src/stack.c (meta_stack_get_default_focus_window): never use a
window with input = FALSE take_focus = FALSE as the default focus
window #95454 fix from Hidetoshi Tajima
2002-11-10 James M. Cape <jcape@ignore-your.tv>
* src/themes/Esco/metacity-theme-1.xml: Major changes
to look of theme. I'd also recommend "minimize,maximize:close"
for the button_layout, it looks really slick :-).
Thu Nov 7 17:07:21 2002 Jonathan Blandford <jrb@redhat.com>
* src/libmetacity-private.pc.in: add a pc file for
libmetacity-private
* src/Makefile.am: Install a few files as a shared library so that
others can draw metacity themes.
2002-11-06 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (grab_keys): push an error trap around the
whole window-key-grab loop
(ungrab_all_keys): avoid requiring return value from the error
trap, unless in debugging mode
(regrab_window_bindings, regrab_screen_bindings): push traps
around the loops, for efficiency
* src/display.c (event_callback): fix from Padraig O'Briain to
compress extra MappingNotify events to avoid extra work.
2002-11-04 Havoc Pennington <hp@pobox.com>
* src/theme.c (scale_and_alpha_pixbuf): fix bug I introduced in
case where scaling was done in both directions.
2002-11-04 Havoc Pennington <hp@pobox.com>
Patch from Brian Cameron to implement the vertical/horizontal
striped image accelerated scaling from the gtk pixbuf engine.
* src/theme.c (scale_and_alpha_pixbuf): if an image is
vertical/horizontal stripes, use special extra-fast scaling
routines.
* src/theme-parser.c (parse_draw_op_element): when loading an
image, mark it as vertically/horizontally striped when appropriate
2002-11-04 Erwann Chenede - <erwann.chenede@sun.com>
* src/xprops.c (meta_prop_get_values): changed __FUNCTION__
to G_GNUC_FUNCTION as __FUNCTION__ is not portable.
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_grab): remove XSync calls from here
(meta_display_ungrab): remove XSync from here, but put in
an XFlush to be sure we get the ungrab sent.
* src/util.c (meta_topic): track sync count here
* src/errors.c: move sync count out of here
Throughout: error spew on all XSync() calls
* src/run-metacity.sh: don't set METACITY_DEBUG
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_new): use window-props.h stuff for a
couple of properties
(implement_showing): fix printf string
* src/xprops.c (meta_prop_free_values): new function
* src/window-props.h, src/window-props.c: start moving code that
handles loading window properties into this file.
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_calc_showing): split into "see if we
should be showing" and "actually show/hide" functions
(idle_calc_showing): rework to first unmap all newly-hidden
windows from bottom to top then map all newly-showing windows from
top to bottom resulting in fewer exposes, #95220
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/theme.c (meta_frame_layout_calc_geometry): fix from Garrett
LeSage for which button backgrounds we draw when
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/workspace.c (meta_workspace_get_name): new function,
and remove workspace->name field, instead just get the
name from prefs each time
* src/screen.c (meta_screen_update_workspace_names): update the
gconf key to persist workspace names here, instead of changing
the names we use
* src/util.c (topic_name): add META_DEBUG_PREFS
* src/prefs.c: change NUM_COMMANDS to 32 to allow more custom
commands, implement workspace names
* src/metacity.schemas.in: add workspace_names/name_NN gconf keys.
2002-10-28 Havoc Pennington <hp@pobox.com>
* src/window.c, src/display.c: store the window menu on the
display and blow it away when a window closes, so we don't
get funny stuck menus. Patch from Martin Garton #87514
2002-10-27 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_free): move
meta_window_shutdown_group() much earlier in the destroy process.
May fix#96928 tracked down by Kjartan Maraas and Martin Garton.
* src/group.c (meta_window_get_group): never add window to a group
after we've started unmanaging the window
2002-10-26 Havoc Pennington <hp@pobox.com>
* src/iconcache.c: include config.h
* src/group.c: include config.h
* src/frame.c: include config.h
* src/core.c: include config.h so it doesn't crash all over the
place due to #ifdef HAVE_STARTUP_NOTIFICATION
* src/util.c (meta_print_backtrace): export from this file
* src/main.c (log_handler): print backtrace here
2002-10-26 Havoc Pennington <hp@pobox.com>
* src/xprops.c (meta_prop_get_text_property): new function
(meta_prop_get_wm_hints): new function
(meta_prop_get_class_hint): new function
2002-10-26 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_new): use multi-value-get on a couple
of properties for testing
* src/xprops.c (meta_prop_get_values): implement multi-value-get
* src/window.c (update_mwm_hints): XFree motif hints as we changed
it to use Xmalloc
* src/xprops.c: massively rework this to set up a
get-multiple-properties-at-once API.
* src/async-getprop.c (ag_Xmalloc): new function
2002-10-25 Havoc Pennington <hp@pobox.com>
Add "busy cursor on app startup" support, conditionally - works
only if libstartup-notification is found, and in practice requires
a GTK patch that's not in yet.
* src/screen.c: monitor startup events and set busy cursor if
appropriate
* src/display.c (meta_display_open): create SnDisplay
* configure.in: check for startup notification,
and add the cute "configure summary" at the end
2002-10-24 Havoc Pennington <hp@redhat.com>
* src/theme.c (meta_frame_layout_calc_geometry): if only one
right-corner button, use right_right_background not
right_left_background
2002-10-24 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_get_icon_geometry): make public
* src/screen.c (meta_screen_ensure_tab_popup): put the alt+tab
highlight-window indicator on the icon, not the window itself,
if the window is minimized.
2002-10-21 Havoc Pennington <hp@redhat.com>
Optimizations for managing new windows (do not all take effect if
METACITY_DEBUG=1). Bug #96404
* src/keybindings.c (meta_change_keygrab): use error trap nesting
and conditionalize on meta_is_verbose() to avoid a ton of XSync
* src/display.c (meta_change_button_grab): ditto
Throughout: move to new error trap setup to save on XSync calls,
new setup is:
* src/errors.c (meta_error_trap_push_with_return): new function,
an error trap that needs to care about return value and thus
sync even if an outer trap still exists
(meta_error_trap_pop_with_return): new function
(meta_error_trap_pop): add "last_request_was_roundtrip"
argument allowing us to avoid XSync() if we just did
a GetProperty or whatever.
* src/util.c (meta_warning): flush the warning file descriptor
* src/Makefile.am (INCLUDES): define G_LOG_DOMAIN
2002-10-20 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (handle_raise_or_lower): check above->mapped
before deciding if it overlaps the window being raiselowered,
fix from Stephane Chauveau
2002-10-18 Havoc Pennington <hp@redhat.com>
* src/window.c (meta_window_refresh_resize_popup): only create the
resize popup if width_inc or height_inc are > 1
* src/resizepopup.c: Clear out all the weird tickmark cruft,
saves us about 2.5K of binary size, whee
(meta_ui_resize_popup_new): take display/screen arguments and make
multihead-safe #94349
2002-10-18 Havoc Pennington <hp@redhat.com>
* src/keybindings.c (do_choose_window): don't start the cycle
process if the binding for switching windows has no modifier bits,
just focus the window immediately.
* src/prefs.c, src/keybindings.c: add a keybinding to move between
windows that goes in the opposite direction. This is mostly
useful if you want to bind unmodified keys to the switch windows
functions, e.g. if you have "Forward" and "Back" keys on your
keyboard. Patch from Shilad Sen <shilad sourcelight com>
2002-10-18 Havoc Pennington <hp@redhat.com>
* src/prefs.c, src/frames.c: add "what happens when you double
click the titlebar" setting, patch from Sean Middleditch bug
#95625. This is basically an "add Windows emulation mode" patch.
2002-10-18 Havoc Pennington <hp@redhat.com>
* src/metacity.schemas.in: move window-click to Super+click not
Alt+click by default. Super should be the Windows key on keyboards
that have one and are so configured. Prepare for the FAQ on this.
2002-10-18 Havoc Pennington <hp@pobox.com>
* src/stack.c (constrain_stacking): replace the old
apply_constraints with wacky new approach involving graphing all
the constraints then walking the graph. Fixes#94876 and probably
other stacking bugs as well, thanks to Arvind for tracking down
the issue.
(compute_layer): add FIXME and reference to bug #96140
2002-10-17 Havoc Pennington <hp@redhat.com>
* src/stack.c (apply_constraints): don't place
transient-for-whole-group windows above _each other_, only
above other windows in the group that aren't themselves
transient-for-whole-group. Should help with part of #94876
2002-10-17 Havoc Pennington <hp@redhat.com>
* src/stack.c (apply_constraints): fix memory leak of
group_windows, and don't use the variable name "tmp" twice. Shadow
variables bad.
2002-10-17 Havoc Pennington <hp@redhat.com>
* src/tools/metacity-window-demo.c (dialog_cb): add code to create
big stacks of dialogs transient for each other, for testing.
2002-10-16 Havoc Pennington <hp@redhat.com>
* src/workspace.c: workspaces are all per-screen now, fix
accordingly
* src/core.c: fix multihead workspace stuff
* src/keybindings.c: multihead-rama
* src/screen.c (meta_screen_show_desktop): new functions to
replace display equivalents
* src/display.c (meta_display_get_workspace_by_screen_index): get
rid of this
(meta_display_get_workspace_by_index): get rid of this
(event_callback): handle _NET_SHOWING_DESKTOP message per-screen
* src/screen.c (meta_screen_get_workspace_by_index): new function
* src/screen.h (struct _MetaScreen): move workspace list, and
showing_desktop flag, to be per-screen
* src/window.c (window_query_root_pointer): return whether pointer
is on window's screen
(meta_window_handle_mouse_grab_op_event): don't use coordinates
from other screens when updating a window operation on the current
screen. I can't believe no one has reported this...
2002-10-16 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_client_message): update window layer
when above/below state is changed. Fixed by Ross Burton.
2002-10-14 Federico Mena Quintero <federico@ximian.com>
* src/display.c (event_callback): Ignore EnterNotify events when
the detail field is set to NotifyInferior. Fixes#95747.
2002-10-12 Havoc Pennington <hp@pobox.com>
* src/metacity.schemas.in: button layout key
* src/prefs.c: Add button layout gconf key
(change_notify): use some "else if" instead of "if" where we
should have been
2002-10-11 Havoc Pennington <hp@redhat.com>
* src/display.c (event_callback): don't raise window on button 2
click, only on button 1 and button 3.
* src/frames.c (meta_frames_button_press_event): lower on button 2
press on frame
* src/core.c (meta_core_user_lower): new function
2002-10-11 Havoc Pennington <hp@pobox.com>
* src/stack.c (window_is_fullscreen_size): make the checks here
allow windows larger than the screen in addition to
exactly-screen-size
* src/window.c (meta_window_configure_request): delete the "try to
auto-enter-fullscreen-state" hack here, because it was broken, and
the changes to the stacking code to move screen-size focused
windows to the fullscreen layer should work better.
(meta_window_new): remove auto-fullscreen hack from here too
2002-10-09 Havoc Pennington <hp@pobox.com>
* src/stack.c (apply_constraints): also keep utility/menu/toolbar
windows above their whole group.
(get_standalone_layer): don't use META_LAYER_FOCUSED_WINDOW, but
only use META_LAYER_FULLSCREEN while the fullscreen window has
focus. Also, put screen-sized windows in the fullscreen layer,
even if we didn't dare to actually put them in the fullscreen
state.
2002-10-07 Havoc Pennington <hp@redhat.com>
Add a modifier key preference for the Alt+click stuff.
Can be set to "disabled" as well.
* src/run-metacity.sh: load .Xmodmap in the Xnest if it exists
* src/display.c (meta_display_ungrab_window_buttons): ungrab
AnyModifier in case the modifier changed since we grabbed
(meta_display_open): rearrange code to use meta_display_close() to
mop up when we can't find any screens, avoiding the need to
keep the bail-out code in sync with meta_display_close.
* src/keybindings.c (devirtualize_modifiers): move this function
to a public place in display.c
* src/metacity.schemas.in: add setting for the modifier key
to use for Alt+left/middle/right click.
* src/prefs.c (update_binding): add a missing newline to a warning
(meta_prefs_get_mouse_button_mods): new function
* src/ui.c (meta_ui_parse_modifier): new function
2002-10-06 Havoc Pennington <hp@pobox.com>
* src/async-getprop.c: Add wacky hack suggested by Keith Packard
to get X properties asynchronously. Not actually used by metacity
yet, but thinking about it.
2002-10-04 Havoc Pennington <hp@redhat.com>
* src/display.c (event_callback): do XRRUpdateConfiguration()
if we have RandR extension, else poke in Xlib's screen struct to
update the screen size.
* configure.in: fix a bogus overwrite of cppflags,
add a check for RandR extension
2002-10-04 Arvind Samptur <arvind.samptur@wipro.com>
* src/window.c (meta_window_change_workspace): call meta_window_unstick
before adding window to workspace.
(menu_callback): call meta_workspace_activate before meta_window_change_workspace.
This would avoid us running an extra loop for determining the window workspace list.
Patches from Jeyasudha and Arvind. Fixes#92575
2002-10-03 Havoc Pennington <hp@pobox.com>
* src/themes/Esco/metacity-theme-1.xml: only specify the
middle backgrounds, let left/right fall back to middle
* src/theme.c (get_button): fall back to middle_background draw
routines when missing the left/right button backgrounds.
(button_rect): fix to handle drawing middle button backgrounds
(meta_frame_style_draw): draw middle background once per middle
button
2002-10-03 Havoc Pennington <hp@pobox.com>
Button-reordering patch. Has all the code except actually
installing a gconf schema and reading the gconf key in prefs.c.
metacity-theme-viewer displays the button layouts for testing
themes.
* src/preview-widget.c (meta_preview_size_request): make up a
width/height if no child widget
* src/prefs.c (meta_prefs_get_button_layout): new function
* src/frames.c: get the button layout from prefs and
use it when drawing
* src/theme.c (meta_frame_layout_calc_geometry): enhance to be
able to lay out buttons in different arrangements
(button_rect): draw the new button background rectangles
(meta_theme_draw_frame): require a button layout argument
(meta_theme_calc_geometry): pass in the button layout
* src/preview-widget.h: mod to handle button layouts
* src/theme-viewer.c: mod to handle button layouts
2002-10-01 Havoc Pennington <hp@pobox.com>
* src/place.c (find_next_cascade): try extra cascades alongside
the first, if the first fails; patch from readams@hmc.edu
2002-10-01 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_resize_func): make it static
* src/stack.c (get_standalone_layer): put above/below windows
in an appropriate layer.
* src/screen.c (set_supported_hint): say we support above/below
* src/display.h (struct _MetaDisplay): add _NET_WM_STATE_ABOVE,
_NET_WM_STATE_BELOW atoms
* src/window.c (meta_window_client_message): handle above/below
state messages
(set_net_wm_state): handler above/below state
(update_net_wm_state): handle above/below states
2002-10-01 Havoc Pennington <hp@pobox.com>
* src/window.c (constrain_position): always align fullscreen
windows to top, as we do with maximized windows.
2002-09-29 Havoc Pennington <hp@pobox.com>
* src/eggaccelerators.c: update from libegg to get fix from Ralph
Loader for <Super> <Hyper> <Meta> parsing, #93005
2002-09-28 Havoc Pennington <hp@pobox.com>
Patch from Keith Packard to handle root window resizes.
* src/screen.c (reload_xinerama_infos): factor out Xinerama code
(meta_screen_resize): implement this, to be called from display.c
on screen resize
* src/display.c (event_callback): handle ConfigureNotify on root
windows
2002-09-28 Havoc Pennington <hp@pobox.com>
* src/window.c, src/stack.c: Rewrite stack code to work a lot
differently. Should be better now, and not lose relative positions
of windows when moving among layers. Also should now be possible
to get session management to restore the stacking order. Probably
breaks some stuff, and makes all the stack.c changes I made
yesterday sort of irrelevant.
2002-09-27 Havoc Pennington <hp@pobox.com>
* src/stack.c (get_standalone_layer): Temporarily disable use of
the FOCUSED_WINDOW layer, because given the fact that moving
multiple windows into the same layer changes the Z-order of those
windows, it was breaking click-to-focus.
2002-09-27 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_focus_top_window): raise the focused
window, since it may not be the window on top, given the below
change.
* src/stack.c (meta_stack_get_default_focus_window): make this
more complex to prefer to focus the transient parent, followed by
other windows in group, followed by topmost non-dock, followed by
dock. Previously was just topmost non-dock followed by dock
ignoring groups and transiency.
2002-09-27 Havoc Pennington <hp@pobox.com>
* src/place.c (constrain_placement): constrain placement to try to
keep windows from going offscreen to the right/bottom
* src/stack.c (compute_layer): rearrange the logic here to say
that a window must always be in at least as high a layer as any of
its transient parents or group members, rather than special-casing
fullscreen. Also, group_member_is_fullscreen was leaking the list
of group members every time, a fairly major memory leak.
2002-09-27 Havoc Pennington <hp@redhat.com>
Try to handle Solaris Xinerama, all coded blind, someone
on Solaris will need to debug the typos.
* src/display.c: updates for Solaris Xinerama
* src/screen.c: updates for Solaris Xinerama
* configure.in: make Xinerama check more complicated to catch
Solaris Xinerama
2002-09-26 Havoc Pennington <hp@pobox.com>
* src/menu.c (meta_window_menu_new): use MetaAccelLabel to display
accelerators for the menu items
* src/metaaccellabel.c: cut-and-paste GtkAccelLabel and port to
use virtual modifiers
* src/Makefile.am (metacity_SOURCES): add metaaccellabel.[hc]
* src/prefs.c (meta_prefs_get_window_binding): new function
* src/core.c (meta_core_get_menu_accelerator): new function
2002-09-24 Havoc Pennington <hp@pobox.com>
* src/place.c (fit_rect_in_xinerama): update best_overlap as we go
through the loop - doh. Fix from readams@hmc.edu for #90799.
(find_first_fit): try the origin of each xinerama screen
after the first. Also from readams@hmc.edu
2002-09-24 Havoc Pennington <hp@redhat.com>
* src/window.c (meta_window_save_rect): new function,
only saves rect after checking current state, #93795
(meta_window_make_fullscreen): use new function
(meta_window_maximize): use new function
2002-09-24 Havoc Pennington <hp@redhat.com>
* src/window.c (meta_window_update_layer): new function
* src/stack.c (compute_layer): put focused window in a layer above
all other windows, in click-to-focus mode. #93022
* src/window.c (meta_window_notify_focus): update window layer on
focus change.
2002-09-24 Havoc Pennington <hp@redhat.com>
* src/main.c (main): support --version, #92796 patch from
Christian Neumair
* autogen.sh: change gettext test to be happy with
glib-gettextize, #81425
* src/menu.c: change mnemonics to match bug #78999
* src/theme.c (meta_theme_validate): consolidate some
nearly-identical themes for ease of translation, #70962
2002-09-23 Havoc Pennington <hp@pobox.com>
* src/main.c (main): re-enable the log handler, maybe it will
break something, I don't remember why I turned it off.
* src/display.c: s/_NET_SHOW_DESKTOP/_NET_SHOWING_DESKTOP/ which
is what's in the spec
2002-09-22 Havoc Pennington <hp@pobox.com>
* src/window.c (recalc_window_features): small reordering of
code
* src/display.c (meta_spew_event): more spew for MapNotify,
UnmapNotify
* src/window.c (recalc_window_features): spew more stuff
* src/display.c (meta_spew_event): spew override_redirect field of
ConfigureNotify
2002-09-15 Havoc Pennington <hp@pobox.com>
* src/session.c (save_state): escape the window title before
saving in the session file, reported by Jos Vos
2002-09-12 Havoc Pennington <hp@redhat.com>
* src/workspace.c (meta_workspace_screen_index)
(meta_workspace_index): fix compiler warnings
* src/tools/metacity-window-demo.c (menu_items): add a test for
dialogs with no transient parent
* src/place.c (find_first_fit): Try placing window at origin of
first Xinerama, even if there are no windows to place next to;
makes placement work when no other windows are open on the screen.
2002-09-03 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_get_tab_current): new function
* src/keybindings.c (do_choose_window): apply modified patch from
JeyaSudha to still display tab popup if only one window is on the
desktop.
2002-09-03 Havoc Pennington <hp@pobox.com>
* src/frames.c (meta_frames_update_prelit_control): don't filter
out prelight for unmaximize button. #83860
(meta_frames_paint_to_drawable): handle unmaximize here as well