2002-06-22 Havoc Pennington <hp@pobox.com>
* src/workspace.c (set_number_of_spaces_hint): do nothing if
screen is being unmanaged, we don't want to blow away state,
we want to remember it for the next window manager.
2002-06-22 Havoc Pennington <hp@pobox.com>
* src/workspace.c (meta_screen_ensure_workspace_popup): rename
from meta_workspace_ensure_tab_popup, and use workspace->name
instead of a hardcoded name
2002-06-22 Havoc Pennington <hp@pobox.com>
* src/xprops.c (meta_prop_get_utf8_list): new utility function
* src/display.c (meta_display_open): _NET_DESKTOP_NAMES atom
(event_callback): update workspace names when the property changes
* src/screen.c (set_supported_hint): "support" _NET_DESKTOP_NAMES
(nothing to do really)
2002-06-08 Havoc Pennington <hp@pobox.com>
* src/xprops.c (meta_prop_get_utf8_string): don't die on bad atom
name
* src/display.c (meta_display_close): don't unmanage windows here,
do it in screen_free and then closing the display unmanages
windows as a side effect of unmanaging the screen
(meta_display_unmanage_screen): new function
(process_selection_clear, process_selection_request): handle
selection stuff
(meta_spew_event): don't crash on client message containing
invalid atom
(meta_spew_event): don't crash on property notify with invalid
atom
* src/main.c (main): add --replace option to replace existing
window manager.
* src/screen.c: implement holding manager selection.
* src/display.c (meta_display_open): add new selection-related
atoms.
2002-06-06 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_get_current_xinerama): implement
* src/place.c (meta_window_place): cascade windows on the active
Xinerama screen
* src/window.c (meta_window_move_resize_internal): strip out the
#if 0 cruft about guessing fullscreen mode
(constrain_position, constrain_size): fullscreen/maximize to the
Xinerama head, not the whole screen
(meta_window_get_work_area): autocreate struts at the Xinerama
physical screen edges for the screen the window is on.
* src/screen.c (meta_screen_get_xinerama_for_window): someone
snuck in a for loop, fix it. ;-)
2002-05-28 Havoc Pennington <hp@pobox.com>
Patch from Erwann Chenede for raise_or_lower keybinding
* src/display.c, src/common.h: POINT_IN_RECT moved to a common
location, removed from here
(meta_rectangle_intersect): move here and make it public
* src/prefs.c: add raise_or_lower keybinding
* src/stack.c (meta_stack_get_below, meta_stack_get_above): add an
arg to only get windows within the same layer
* src/keybindings.c (handle_raise_or_lower): add handling for a
"raise window if obscured, else lower" keybinding
2002-05-15 Havoc Pennington <hp@pobox.com>
* src/workspace.c (meta_workspace_get_neighbor): use the layout
information to figure out up/down neighbors
* src/display.c (event_callback): catch propertynotify on
_NET_DESKTOP_LAYOUT
* src/screen.c (meta_screen_update_workspace_layout): keep track
of the layout of workspaces as set by the pager
2002-05-11 Anders Carlsson <andersca@gnu.org>
* src/display.c: (find_tab_forward), (find_tab_backward),
(meta_display_get_tab_next):
* src/display.h:
* src/keybindings.c: (handle_tab_forward), (handle_focus_previous):
Add screen argument to meta_display_get_tab_next, since we only
want windows on the same screen to appear in the tab chain.
* src/screen.c: (meta_screen_new):
Or the event mask with existing events since gtk+ may listen to
certain events and we don't want to disable those events.
(meta_screen_ensure_tab_popup):
* src/tabpopup.c: (meta_ui_tab_popup_new):
* src/tabpopup.h:
Add a screen number argument to meta_ui_tab_popup_new so we
can position the popup on the correct screen.
2002-05-07 Anders Carlsson <andersca@gnu.org>
* src/display.c: (meta_display_open), (event_callback),
(meta_display_update_show_desktop_hint):
* src/display.h:
* src/screen.c: (set_supported_hint):
Fix atom name; it's _NET_SHOW_DESKTOP, not
_NET_WM_SHOW_DESKTOP.
* src/frames.c: (meta_frames_unmanage_window):
Restore the mouse cursor to default when unmanaging a window.
2002-05-06 Anders Carlsson <andersca@gnu.org>
* src/display.c: (set_utf8_string_hint):
Fix an off-by-one error.
(meta_display_open),
(event_callback), (meta_display_update_show_desktop_hint),
(meta_display_show_desktop), (meta_display_unshow_desktop):
* src/display.h:
* src/screen.c: (set_supported_hint):
Add support for _NET_WM_SHOW desktop, both as a message and
as a root window property.
2002-04-28 Anders Carlsson <andersca@gnu.org>
* src/display.c: (meta_display_open):
* src/display.h:
* src/screen.c: (set_supported_hint):
* src/workspace.c: (set_number_of_spaces_hint),
(set_workarea_hint):
Add support for setting the _NET_WM_WORKAREA hint. No code
does it yet though.
2002-04-28 Havoc Pennington <hp@pobox.com>
* README: remove caveats about keybindings
* src/metacity.schemas: add schemas for all the keybindings.
* src/window.c (meta_window_activate): if in "show desktop" mode
when a window is activated, leave show desktop mode. So e.g.
when you click on a task in the task list, show desktop mode
will be turned off.
* src/workspace.c (meta_workspace_get_neighbor): new function
that doesn't quite work yet (needs support for getting
workspace layout from the pager)
* src/prefs.c: keybindings stuff
* src/keybindings.c: make keybindings configurable
* src/ui.c (meta_ui_parse_accelerator): new function
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-03-02 Havoc Pennington <hp@pobox.com>
* src/display.c: Add hacking to fix the problem that we made our
XGrabPointer() during Alt+Tab actually succeed, so on popping down
Alt+Tab we got an EnterNotify from the ungrab, which resulted in
focusing the window under the mouse. i.e. Alt+Tab didn't work with
sloppy focus.
2002-02-26 Havoc Pennington <hp@pobox.com>
Screw around with Anders's ping patch so he'll get plenty of CVS
conflicts. ;-)
* src/display.c (meta_display_ping_window): spew warnings
if we try to call this with CurrentTime
(meta_display_ping_timeout): remove ping from the pending pings
after it times out.
* src/util.h: added PING debug category
* src/display.c (remove_pending_pings_for_window): don't remove
"tmp" just before "tmp->next", don't break out of loop after
finding the first match
(meta_display_open): no trailing comma in array init
(event_callback): move the processing of ping replies into a
separate function
* src/screen.c (set_supported_hint): add _NET_WM_PING to supported
list
* src/display.h: change gpointer to void*
2002-02-26 Anders Carlsson <andersca@gnu.org>
* src/display.c: (ping_data_free),
(remove_pending_pings_for_window), (meta_display_open),
(event_callback), (meta_display_unregister_x_window),
(meta_display_ping_timeout), (meta_display_ping_window),
(meta_display_window_has_pending_pings):
Implement meta_display_ping_window, and filter out scroll wheel
events.
* src/display.h:
Add MetaWindowPingFunc, meta_display_ping_window and
meta_display_window_has_pending_pings.
2002-02-24 Havoc Pennington <hp@pobox.com>
* src/display.c (xcursor_for_op): switch on the op passed in, not
the active op. Gives us the right cursor during resizing, etc.
* src/errors.c: rearrange all the error stuff to adapt to the GDK
change a while back, so now we print our X errors again
* src/display.c (meta_display_begin_grab_op): remove KeyPressMask
and KeyReleaseMask from the XGrabPointer(), this caused BadValue
and kept the grab from ever succeeding. Fixes the problem with the
GTK resize grip - this is why you shouldn't break your X error
spew. ;-)
* src/display.c: debug spew tweaks
* src/window.c (meta_window_client_message): do some
s/verbose/topic/ stuff
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/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-02-08 Havoc Pennington <hp@pobox.com>
* src/screen.c (set_supported_hint): add _NET_WM_STATE_HIDDEN
to _NET_SUPPORTED
* src/keybindings.c (meta_set_keybindings_disabled): put in header
file, to fix warning.
* src/display.c (meta_display_open): add _NET_WM_STATE_HIDDEN atom
* src/window.c (set_net_wm_state): set _NET_WM_STATE_HIDDEN for
shaded and minimized windows
(meta_window_show): call set_net_wm_state() if we map the window
or frame
(meta_window_hide): call set_net_wm_state() if we unmap the window
or frame
2002-02-08 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_show): when mapping a window with
struts, invalidate the work areas it's on. Should fix at least
part of the problem with windows maximizing over panels.
* src/workspace.c (meta_workspace_invalidate_work_area): also
queue move/resize on sticky windows
* src/tools/Makefile.am: consolidate reload-theme, restart into a
"metacity-message" app and add enable/disable keybindings to the
messages it knows about.
* src/keybindings.c:
(meta_change_keygrab): grab keyboard synchronously
(meta_display_process_key_event): if all keybindings are toggled
off, ReplayKeyboard, else AsyncKeyboard, except that the debug
binding for toggling back on is always processed
(meta_set_keybindings_disabled): function to disable/enable
all keybindings
2002-02-06 Havoc Pennington <hp@pobox.com>
* src/main.c (prefs_changed_callback): redo window
sizes/appearance when the theme changes
* src/display.c (meta_display_retheme_all): new function
* src/theme-parser.c (locate_attributes): remove error handling
for MAX_ATTRS reached, add an assert instead, the way this code
ended up the attrs in the array depend on the code not the theme
file.
2002-02-06 Havoc Pennington <hp@pobox.com>
* src/main.c (main): disable custom log handler and fatal mask for
now
* src/theme.c (meta_draw_op_list_draw):
Add META_DRAW_CLIP
* src/main.c: load theme, monitor current theme setting
* src/prefs.c: add "current theme" setting
* src/stack.c (meta_stack_free): don't try to free
last_root_children_stacked if it doesn't exist
* src/themewidget.c: pluggable GtkMisc subclass to use
for menu icons
* src/screen.c (meta_screen_manage_all_windows): fix
signed/unsigned warning
* src/frames.c: port to theme system
(meta_frames_style_set): chain up
* theme-format.txt: new file
* configure.in: add more compiler warnings
* src/theme.c: add various stuff needed to get theme parser
working. Remove the "spacer" concept from FrameLayout object.
Add draw op that references a draw op list.
* configure.in: require GTK 1.3.13
* src/Makefile.am: add theme-parser.[hc], implement loading a
theme
* src/theme.c: add "draw title" and "draw window icon" operations
(meta_draw_op_draw): put object_width/object_height in expression
environment before computing x/y. Handle out-of-memory when
creating pixbufs. Assorted other cleanups.
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-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
2002-01-05 Havoc Pennington <hp@pobox.com>
GTK 1.2 plug/socket clients still broken, don't know why.
* src/screen.c (meta_screen_new): select focus change on root
window, for debugging
* src/display.c (event_callback): when unfocusing, use
no_focus_window to hold the focus
* src/display.h (struct _MetaDisplay): have a no_focus_window to
hold the focus when we don't want to have anything focused.
Then we can avoid confusing focusing-the-frame stuff.
* src/window.c (meta_window_notify_focus): improve some debug spew
(meta_window_notify_focus): add hack from WindowMaker to ignore
focus in events with detail > NotifyNonlinearVirtual
2002-01-03 Havoc Pennington <hp@pobox.com>
* src/window.c: use meta_XFree not XFree
* src/display.h (meta_XFree): add null-safe XFree
* src/util.c (meta_warning): have message prefix indicate that
it's a warning
(meta_fatal): indicate it's an error
* src/window.c (update_sm_hints): clean up using
meta_prop_get_latin1_string
(update_role): ditto
(read_client_leader): clean up using meta_prop_get_window
(update_net_wm_type): clean up using meta_prop_get_cardinal
(update_initial_workspace): ditto
(update_net_wm_type): clean up using meta_prop_get_atom_list
(read_rgb_icon): get result from XGetWindowProperty return value
not from error trap
(update_kwm_icon): ditto
(meta_window_new): fix to read WM_STATE correctly
2002-01-03 Havoc Pennington <hp@pobox.com>
* src/workspace.c (meta_workspace_activate): focus top window when
switching to a new workspace
* src/util.c (meta_topic): start putting verbose output in
categories
* src/window.c (meta_window_shade): focus frame after we queue
the calc_showing so the maps/unmaps have already happened.
* src/display.c (meta_display_get_current_time): add the "get time
of current event" function and call it occasionally.
* src/window.c (meta_window_free): if we have focus, call
meta_screen_focus_top_window().
(meta_window_minimize): ditto
(meta_window_delete): ditto
* src/screen.c (meta_screen_ensure_tab_popup): fix memory leak -
didn't free tab list
(meta_screen_focus_top_window): new function to use when we unmap
or unmanage a focused window
* src/stack.c (meta_stack_get_default_focus_window): function used
in meta_screen_focus_top_window
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-15 Havoc Pennington <hp@pobox.com>
* src/main.c (meta_restart): add a restart feature, for debugging
* src/tools/metacity-restart.c: little utility program to trigger
the restart
2001-10-14 Havoc Pennington <hp@pobox.com>
* src/frames.c (meta_frames_button_press_event): raise/focus
windows on left-click, seem to have broken that yesterday
* src/keybindings.c, src/display.c, src/window.c: add keybinding
to show/hide all normal windows (so you can see the desktop).
Currently Ctrl+Alt+D, which I don't like, but yay.
2001-08-29 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_open): wrong atom name -
_NET_SUPPORTED not _NET_WM_SUPPORTED
* src/window.c (meta_window_configure_request): geez, why were we
honoring configure requests for width/height for normal windows.
Denied!
(meta_window_client_message): _NET_WM_MOVERESIZE support, sort of
(doesn't quite work, acts like owner_events = true?)
* src/display.c: add _NET_WM_MOVERESIZE atom
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/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
2001-08-05 Anders Carlsson <andersca@gnu.org>
* src/display.h, src/display.c: Add _NET_WM_ICON_GEOMETRY atom.
* src/window.c (meta_window_calc_showing): See if the window has
an icon geometry and show a morphing animation from the window's
coordinates to the icon's coordinates.
(meta_window_get_icon_geometry): New function that fetches a
window's icon geometry.
* src/Makefile.am: Add effects.[ch].
* src/effects.c: New file with cool effects.