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-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-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-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-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-08-12 Havoc Pennington <hp@redhat.com>
* src/stack.c (compute_layer): window is in fullscreen layer if
any member of its group is fullscreen
* src/window.c (meta_window_unmake_fullscreen): update layer for
whole window group
(meta_window_make_fullscreen): ditto
* src/util.c (meta_unsigned_long_hash): move hash/equal funcs for
Window in here.
* src/group.c: track window groups so we can do stuff with them.
2002-08-08 Craig Black <blackc@speakeasy.net>
Patch to provide extra cues to the user when using
window menu move and resize, #85724.
* src/common.h: add new cursors
* src/display.c: (grab_op_is_mouse)
(meta_display_create_x_cursor), (xcursor_for_op),
(meta_display_set_grab_op_cursor),
(meta_display_begin_grab_op):
The keyboard move and resize grab ops now also use the mouse.
Allow the grab cursor to be changed during the grab op.
Hold onto the initial grab position in case of reset.
* src/display.h: save the initial grab position
* src/keybindings.c: (process_keyboard_move_grab),
(process_keyboard_resize_grab), (handle_begin_move),
(handle_begin_resize):
The keyboard move and resize grab ops now also use the mouse.
* src/window.c: (meta_window_client_message), (menu_callback),
(update_move), (update_resize),
(meta_window_handle_mouse_grab_op_event), (warp_pointer),
(meta_window_warp_pointer), (meta_window_begin_grab_op),
(meta_window_update_resize_grab_op):
When moving or resizing a window use the last grab position
in computing change increment.
Provide support for warping the mouse pointer.
* src/window.h: new warp pointer and grab op helper functions
2002-07-06 Havoc Pennington <hp@pobox.com>
Apply blackc@speakeasy.net patch, bug #83940, to do
mini-workspaces similar to the pager, when switching
spaces.
* src/window.c (update_net_wm_state): actually fill in
wm_state_skip_taskbar, wm_state_skip_pager flags
* src/tabpopup.c: support drawing a mini-workspace similar to the
one the pager draws.
* src/stack.c (meta_stack_list_windows): new function to list
the windows in stacking order
* src/screen.c (meta_screen_ensure_workspace_popup): don't pass in
the ugly default app icon for workspaces
* src/display.c (event_callback): fix from blackc@speakeasy.net
to avoid dereferencing a NULL grab window.
2002-07-02 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_show_menu): use new macros to get
whether we allow move/resize correct
* src/frame.c (meta_frame_get_flags): use new macros to get
whether we can move/resize correct, considering
maximized/fullscreen for the move case.
* src/window.h (META_WINDOW_ALLOWS_RESIZE,
META_WINDOW_ALLOWS_MOVE): new macros
* src/keybindings.c (process_keyboard_resize_grab): finish the
right/left resize, patch from Jayaraj #78179.
Has the same old move/resize bug, if it hits a constraint it
starts to break because we move without resizing.
2002-06-21 Havoc Pennington <hp@pobox.com>
Theme breakage! Themes have to implement "border" frames
now, see Atlanta for an example. Fixes#84285
* src/tools/metacity-window-demo.c (do_appwindow): add a
border-only window
* src/window.c (update_mwm_hints): read border only from the MWM
hints
* src/window.h (struct _MetaWindow): add border_only flag
* src/core.c (meta_core_get_frame_type): report border type if
required
* src/common.h (enum): add META_FRAME_TYPE_BORDER
2002-06-08 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_get_xinerama_for_window):
short-circuit the "only one xinerama" case, and use outer rect of
window instead of window->rect, so we get root window coords.
* src/theme.c (meta_frame_layout_get_borders): if fullscreen all
frame edges are zero-width.
* src/frame.c (meta_frame_get_flags): init fullscreen flag.
* src/common.h (enum): add META_FRAME_FULLSCREEN frame flag
* src/place.c: fix up calls to meta_window_get_work_area
* src/window.c (meta_window_get_work_area): add an arg for whether
the work area is for the screen or the xinerama subscreen.
(constrain_position): fix up calls to meta_window_get_work_area
(constrain_size): ditto
* src/screen.c (meta_screen_new): add METACITY_DEBUG_XINERAMA
environment variable which simulates xinerama on a single head.
2002-05-26 Havoc Pennington <hp@pobox.com>
Patch from Gaute Lindkvist so you can't move the panel or desktop
to only one workspace.
* src/keybindings.c (handle_move_to_workspace): don't allow moving
window to another space if the window is always_sticky
* src/window.c (recalc_window_features): set the always_sticky
field for desktop/dock windows.
(meta_window_show_menu): disable unsticking always sticky windows
via the menus
* src/menu.c (meta_window_menu_new): disable workspace items
if requested
2002-05-09 Havoc Pennington <hp@redhat.com>
* src/frames.c (show_tip_now): DefaultScreen() returns the screen
number not Screen*
* src/frame.c (meta_frame_sync_to_window): immediately repaint
frame whenever we resize it, if we're inside a grab operation.
* src/frames.c (meta_frames_repaint_frame): new function
* src/window.c (meta_window_new): initialize window's colormap
(meta_window_notify_focus): install the colormap for a window when
it gets focus, uninstall on unfocus.
* src/window.h (struct _MetaWindow): store window's colormap
* src/display.c (event_callback): note changes to window colormap
* src/frame.c (EVENT_MASK): add ColormapChangeMask
2002-05-05 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_unminimize): on unminimize, queue
calc_showing on all transients
(meta_window_activate): on activate, unminimize all a window's
ancestors, not just the window itself.
* src/workspace.c (set_work_area_hint): don't increment "tmp" by
16 unsigned long, increment by 4
* src/window.c (meta_window_free): if a window isn't minimized,
restore its WM_STATE to NormalState instead of IconicState,
since IconicState on initial window map means that the window
should be minimized.
* src/workspace.c (meta_workspace_invalidate_work_area): queue an
idle to recompute the work area hint.
(set_work_area_hint): we need 4*num_workspaces ints, not just
num_workspaces.
* src/screen.c (meta_screen_new): add work_area_idle field,
handle it on screen shutdown
* src/common.h (META_PRIORITY_PREFS_NOTIFY,
META_PRIORITY_WORK_AREA_HINT): define some idle priorities
* src/window.c (meta_window_calc_showing): hide windows if
their parent window is minimized
(meta_window_minimize): also queue_calc_showing on all
transients of the window being minimized
* src/place.c (constrain_placement): function to apply
placement-time-only constraints, such as "not off the left of the
screen"
(meta_window_place): put dialogs down a bit over their parent,
not right at the top.
(meta_window_place): when centering a dialog, center it
on the current xinerama screen, rather than the entire
screen.
* src/screen.c (meta_screen_get_current_xinerama): new function,
but not implemented
2002-04-15 Havoc Pennington <hp@redhat.com>
* src/display.c (meta_display_ping_window): reply immediately for
windows that don't support _NET_WM_PING
* src/window.c (update_protocols): check whether windows
support _NET_WM_PING
2002-04-13 Havoc Pennington <hp@pobox.com>
* src/delete.c: new file containing all the
wacky mess I just added to a simple "click the close button",
contains all the dealing-with-dead-application cruft.
Use metacity-window-demo to test by clicking the
toolbar button that locks it up.
2002-04-05 Havoc Pennington <hp@pobox.com>
* src/stack.c: remove the unused tab stuff
* src/display.c: implement tab list among panels
* src/keybindings.c: fill in move-between-panels keybindings
2002-03-17 Havoc Pennington <hp@pobox.com>
* src/resizepopup.c: Add some total crackrock resize-grid
indication for windows that have width_inc/height_inc
so I can debug gnome-terminal sizing.
2002-03-11 Havoc Pennington <hp@pobox.com>
* src/keybindings.c: use new functions
* src/display.c (meta_display_get_tab_next):
(meta_display_get_tab_list): new tab order functions using
MRU list instead of map order
* src/window.c (meta_window_notify_focus): maintain focus MRU list
* src/display.h (struct _MetaDisplay): Keep an MRU list of
windows.
2002-02-19 Havoc Pennington <hp@pobox.com>
* src/ui.c (meta_ui_init): put in hack to keep Pango from mangling
our server grab and locking up on startup. (hack doesn't work
but I want to fix it on my real computer not this laptop)
* src/window.c: Implement _NET_WM_STATE_FULLSCREEN
* src/display.c (meta_display_open): add atoms for
_NET_WM_STATE_FULLSCREEN
2002-02-09 Havoc Pennington <hp@pobox.com>
* src/window.c (update_icon): port to icon cache
* src/iconcache.c, src/iconcache.c: begin process of cleaning up
window.c by moving the icon-reading code in here, based on the
code in libwnck, which was in turn based on the earlier metacity
code
2002-02-09 Havoc Pennington <hp@pobox.com>
* src/themes/Atlanta/metacity-theme-1.xml: put in some kind of
distinctive frame for UTILITY, though it's ugly. Also put in the
borderless look for maximized windows.
* src/stack.c (compute_layer): put splash screen in the splash
layer
* src/stack.h (enum): create a splash screen layer
* src/place.c (meta_window_place): center splashscreen, and fix a
typo in the centering code
* src/window.c (recalc_window_features): disable most features on
splash screens
* src/screen.c (set_supported_hint): add UTILITY and SPLASHSCREEN
hints
* src/window.c: add UTILITY, SPLASHSCREEN implementation
* src/window.h (enum): add UTILITY, SPLASHSCREEN types
* src/theme-parser.c (parse_toplevel_element): parser support
for has_title attribute
* src/theme.c (meta_frame_layout_get_borders): handle a has_title
field in the layout, for utility windows that don't display a
title (would be better to be able to shrink the title text,
but that's kind of tricky to implement :-/)
2002-01-27 Havoc Pennington <hp@pobox.com>
* src/frames.c (get_control): Only consider the bottom of the
titlebar a resize control; I keep accidentally resizing windows
instead of activating them. Also, give south resizing priority
over north, if the window is so small the active regions overlap
* src/theme.c: add MetaTheme, get MetaFrameStyleSet into
a usable state
* src/common.h: move window type back to window.h, decided
not to use it on frame side
(MetaFrameType): add this instead
2002-01-27 Havoc Pennington <hp@pobox.com>
* src/display.c (event_callback): make the check for whether to
eat focus click a lot more complicated
* src/window.c (meta_window_same_application): new function
* src/prefs.h, src/prefs.c: add application based pref
* src/metacity.schemas: add "application_based" setting to
give me a mode to fool with being application based,
without being unusable in the meantime. Yeah the crack flows
freely these days. Everyone knew it would happen.
2002-01-19 Havoc Pennington <hp@pobox.com>
* src/wm-tester/test-resizing.c: cheesy client with static
bit gravity, used to test the below change.
* src/window.c (meta_window_move_resize_internal): implement
Owen's proposal for window resizing.
http://mail.gnome.org/archives/wm-spec-list/1999-November/msg00088.html
Currently you have to do METACITY_USE_STATIC_GRAVITY=1 in order to
use it, because some GDK bug is screwing up exposes on my frames
when it's enabled.
* src/display.c (meta_display_create_x_cursor): fix glyph for
NE/NW cursors
* src/frames.c (get_control): add ability to resize from top
* src/frame.c (meta_frame_get_flags): can't resize shaded windows
(meta_frame_sync_to_window): add gravity arg
* src/common.h (MetaWindowType): move here from window.h so
it can be used in themes stuff.
(MetaFrameFlags): remove META_FRAME_TRANSIENT since it
overlaps with window type and was unused.
2002-01-18 Havoc Pennington <hp@pobox.com>
* src/window.c (constrain_position): give priority to keeping NW
corner onscreen rather than SE, if we need to shift the window
to fit inside constraints
* src/frames.c (meta_frames_get_geometry): don't depend on the
current window size
* src/theme.c: move geometry stuff in here, to be calculated as
part of the theme
* src/core.c (meta_core_get_client_size): new function to replace
meta_core_get_frame_size() so we don't have weird cycles
in the geometry calculation
2002-01-09 Havoc Pennington <hp@pobox.com>
* src/window.c, src/window.h: store strut information,
update it on property changes, etc. etc. so we avoid panel
on maximize.
* src/workspace.c (meta_workspace_get_work_area): add accessor for
work area so we can compute it lazily
* src/display.h, src/display.c: add _NET_WM_STRUT atom
and _WIN_HINTS atom
2001-12-10 Havoc Pennington <hp@pobox.com>
Rework the click-client-area-to-focus support to use synchronous
grabs, avoids a big mess, lets us pass through click when
required (for dock/desktop). Disadvantage is all left-button
clicks now require window manager approval. ;-)
* src/display.c (event_callback): don't focus dock/desktop when
the mouse enters them; require a click.
(meta_change_button_grab): allow sync grabs
(meta_display_grab_unfocused_window_buttons): establish a
synchronous grab and maintain it all the time, rename to
meta_display_grab_focus_window_button
* src/window.c: change to reflect display.c
2001-12-10 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_foreach_window): fix broken
"tmp = tmp->data"
Implement do-not-pass-thru-click for click-to-focus mode.
* src/screen.c (update_focus_mode): when focus mode changes,
update all the window grabs
* src/display.c (meta_display_grab_unfocused_window_buttons):
implement grabbing button 1 on client area of unfocused
click-to-focus windows
* src/window.c (meta_window_update_unfocused_button_grabs): update
whether we're grabbing unmodified button 1 on client area
according to focus state and focus mode
(meta_window_new): start out with proper grab state
2001-10-29 Havoc Pennington <hp@pobox.com>
* README: note exciting new unminimize feature for the tab popup
* src/keybindings.c (process_tab_grab): use meta_window_activate()
when choosing a window with tab popup, this should deiconify it
* src/window.c (meta_window_client_message): use
meta_window_activate for _NET_ACTIVE_WINDOW message
(meta_window_activate): new function to raise/focus/unminimize
(meta_window_flush_calc_showing): new function
(meta_window_focus): force a calc showing on focus, so that we can
focus the window if appropriate (it must be mapped)
2001-10-25 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_visible_on_workspace):
I was using meta_workspace_contains_window() in a number of
places where on_all_workspaces should also have been considered,
thus this new function. Fixes bugs such as pinned windows
not appearing in the tab order.
(meta_window_client_message): use meta_window_visible_on_workspace
* src/stack.c (find_tab_forward): ditto
(find_tab_backward): ditto
(meta_stack_get_tab_next): ditto
(meta_stack_get_tab_list): ditto
* src/place.c (get_windows_on_same_workspace): ditto
* src/keybindings.c (handle_focus_previous): ditto
(handle_focus_previous): ditto
2001-10-14 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_new): take a window mapped at
fullscreen size/pos to desire maximization; once I add a
fullscreen state, will change to copy kwin and take this mapping
as a desire for fullscreen, but for now testing with maximization.
* src/window.h: remove fullscreen window type, now proposing it
as a window state instead.
2001-10-14 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_maximize): always raise windows on
maximize
(meta_window_client_message): when activating a window, move
it to current workspace, instead of moving user to the
window's workspace.
2001-09-16 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_lower): new function
* configure.in: bump version to 2.3.8
* src/display.c (event_callback): raise dock on enter notify,
lower it on leave notify (need to refine this behavior)
* src/stack.c (compute_layer): experiment with putting the panel
in the normal layer, and raising it on mouseover
2001-09-15 Havoc Pennington <hp@pobox.com>
* src/window.c: add support for a mini icon in the titlebar
(update_icon): re-enable support for _NET_WM_ICON
* src/session.c (save_state): add an ferror check when writing
session file
2001-09-10 Havoc Pennington <hp@pobox.com>
* src/window.c: Don't separate user_has_moved/user_has_resized,
fixes bug in east-resizing Emacs, among other things
* src/frame.c (meta_frame_sync_to_window): return immediately if
nothing to do
* src/util.c (ensure_logfile): replace rather than truncate old
logfiles
2001-08-28 Havoc Pennington <hp@pobox.com>
Unbreak tab popup a bit.
* src/stack.c (meta_stack_get_tab_list): add workspace argument
(meta_stack_get_tab_next): add workspace argument
* src/window.c: implement recording of the last user-initiated
window position, so we can magically handle moving panels around
really nicely.
* src/wm-tester/main.c (set_up_icon_windows): fix to use new GTK
API
2001-08-22 Havoc Pennington <hp@pobox.com>
* src/window.c (update_icon): half-ass implementation of
getting pixmap icons (WM_NORMAL_HINTS and KWM_WIN_ICON).
Ignores mask for now, with possibly ugly results for
some apps.
(read_rgb_icon): fixage
2001-08-19 Havoc Pennington <hp@pobox.com>
* src/window.c: add a "fullscreen" semantic type; if a window
requests the screen size exactly, and is undecorated, and is not a
desktop window, we consider it a fullscreen window and keep it on
top.
Totally untested.
2001-08-19 Havoc Pennington <hp@pobox.com>
* src/screen.c (set_supported_hint): we support _NET_WM_ICON
* src/wm-tester/main.c: add stuff to test _NET_WM_ICON
(but it doesn't work, so it isn't tested yet)
* src/window.c (update_icon): read _NET_WM_ICON
* src/screen.c (meta_screen_new): set the WM_ICON_SIZE hint
* src/tabpopup.c (meta_ui_tab_popup_select): remove assertion
* src/window.c (meta_window_get_icon_geometry): fix obscure
memleak