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-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-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.
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-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-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-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-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.