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