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-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-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-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-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-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
2002-07-28 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_shade): disable animation when shading
windows, just doesn't really convey the idea anyway.
* src/effects.c: Move to using a shaped window instead of
IncludeInferiors to do the animations, looks a lot better
because we don't have to grab the server.
* src/window.c (meta_window_change_workspace): remove bogus
assertion that was causing a crash
(meta_window_new): auto-fullscreen huge undecorated windows.
* src/keybindings.c (switch_to_workspace): use
meta_window_change_workspace() to avoid same bug in cut-and-paste
code from there
2002-07-20 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_open): grab display across managing
each screen; XGetInputFocus() on startup.
2002-07-19 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_configure_request): disable configure
requests during a user move/resize operation, mostly a workaround
for stoopid apps.