2002-07-06 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_open): put _NET_DESKTOP_NAMES in the
array of atom names, so desktop names might work and we don't read
uninitialized memory.
* src/main.c (main): add VERSION/timestamp verbose message.
* src/keybindings.c: implement cycle_windows cycle_panels
* src/metacity.schemas.in: add the cycle_windows cycle_panels
keybindings
* src/prefs.h (META_KEYBINDING_FOCUS_PREVIOUS): replace
FOCUS_PREVIOUS key binding with CYCLE_WINDOWS and CYCLE_PANELS
(not good names really, but I don't have ideas).
* src/common.h: add a grab op for alt+esc window cycling
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-07-02 Mark McLoughlin <mark@skynet.ie>
* src/keybindings.c:
(grab_keyboard), (ungrab_keyboard): rename from
{un}grab_all_keys_and_keyboard and only do an XKeyboardGrab,
the XKeyGrab isn't neccessary.
(meta_screen_grab_all_keys), (meta_screen_ungrab_all_keys),
(meta_window_grab_all_keys), (meta_window_ungrab_all_keys):
update for above change.
(handle_workspace_switch): don't use a MetaWindow when
workspace switching, use the root window instead.
2002-07-01 Mark McLoughlin <mark@skynet.ie>
Fix broken workspace switching from my previous commit.
* src/display.c: (meta_display_begin_grab_op): don't
leak a pointer grab if we fail to grab the keyboard.
* src/keybindings.c: (meta_screen_grab_keys): check
screen->all_keys_grabbed.
(meta_screen_grab_all_keys): regrab our standard
bindings if we fail.
(handle_workspace_switch): revert to our previous
behaviour of using the last focused window to do
the grab upon. Only use the RootWindow if there
isn't anything else to use.
* src/screen.c: (meta_screen_new): initialise
all_keys_grabbed.
2002-06-26 Mark McLoughlin <mark@skynet.ie>
Fixes not being able to tab out of a
workspace which contains no windows.
* src/core.c: (meta_core_begin_grab_op): upd
for meta_display_begin_grab_op change.
(meta_core_get_grab_frame): allow for
grab_window == NULL.
* src/display.[ch]:
(meta_display_screen_for_xwindow): implement.
(meta_display_begin_grab_op): grab on the root window
if window == NULL.
(meta_display_end_grab_op): use grab_screen instead of
grab_window.
* src/keybindings.c:
(grab_all_keys_and_keyboard): split out from
meta_window_grab_all_keys.
(ungrab_all_keys_and_keyboard): split out from
meta_window_ungrab_all_keys.
(meta_screen_grab_all_keys), (meta_screen_ungrab_all_keys):
implement grabbing and ungrabbing on the root window.
(meta_display_process_key_event): if window == NULL,
check the event is from the same screen and process. Only
happens with workspace switching.
(process_workspace_switch_grab): kill window param and
don't use grab_window.
(handle_tab_forward), (handle_begin_move): upd for
meta_display_begin_grab_op change.
(handle_workspace_switch): remove brokeness. Always do
the grab op on the root window.
* src/keybindings.h: add meta_screen_{un}grab_all_keys.
* src/window.c: (meta_window_client_message), (menu_callback):
update for meta_display_begin_grab_op change.
2002-06-10 Erwann Chenede - <erwann.chenede@sun.com>
* src/keybindings.c : (handle_close_window, handle_minimize_window)
verify the active window has the appropriate close/minimize function
before closing or minimizing the window.
2002-06-08 Havoc Pennington <hp@pobox.com>
Cleanups to workspace popup patch. Space before all parens
in a couple places.
* src/prefs.c (meta_prefs_get_keybinding_action): fix brace
indentation, and use while instead of for loop. Take a "mask"
argument to avoid ambiguity issues.
* src/keybindings.c (handle_workspace_switch): rename from
handle_workspace_forward since there's no directionality here
(handle_workspace_switch): add a FIXME about how screwed it is
that we need a window in order to do our grab. Should be able to
grab on a dummy window like no_focus_window or the root window.
(process_workspace_switch_grab): rename from tab_grab for clarity,
no tab involved here.
* src/common.h (enum): have only one grab op for all workspace
switching directions, instead of one for each.
2002-06-08 Havoc Pennington <hp@pobox.com>
Apply big patch from blackc@speakeasy.net adding a popup window
to the Ctrl+Alt+arrows shortcuts. #83940
2002-06-08 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_new): select key press/release on the
display->no_focus_window, another attempted fix for not getting
keybindings when no window is focused. Still doesn't seem to work
though. I don't get what's going wrong.
(meta_create_offscreen_window): new function, used instead of
XCreateSimpleWindow so we get override redirect offscreen windows.
2002-06-08 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_open): set net_supporting_wm_check
in addition to win_supporting_wm_check, patch from
JeyaSudha for #83365
* src/screen.c (set_wm_check_hint): remove setting
win_supporting_wm_check on leader window here, done already in
display.c
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-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-24 Havoc Pennington <hp@pobox.com>
* src/window.c (menu_callback): follow windows to their new
workspace
* src/keybindings.c (handle_move_to_workspace): follow windows to
their new workspace
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-10 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (reload_modmap): put LockMask into the
ignored_modifier_mask so that caps lock doesn't mess up
keybindings.
2002-04-30 Havoc Pennington <hp@pobox.com>
* src/window.c (recalc_window_features): don't try to decorate
toolbars.
* src/tools/metacity-window-demo.c: add menu and toolbar tests
* src/place.c (meta_window_place): only dialogs should be centered
over parent, not anything with transient for set.
* src/window.c (meta_window_configure_request): become more
fascist about window positioning if workarounds are disabled, and
less fascist if they are enabled.
* src/metacity.schemas: add a "disable_workarounds" option. Kind
of crack-smoking. But we just can't get all applications
fixed. And I need no-workarounds mode to monitor which apps are
broken and what needs fixing in specs.
* src/window.c (meta_window_configure_request): always allow
windows to resize themselves
* src/keybindings.c (reload_modmap): don't filter out Mode_switch,
apparently some people bind window manager shortcuts to that.
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-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-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-01-15 Havoc Pennington <hp@redhat.com>
* src/keybindings.c (handle_tab_backward): fix crash
when grab failed due to another operation in progress
(handle_tab_forward): fix crash when grab failed
2002-01-10 Havoc Pennington <hp@pobox.com>
* src/frame.c (meta_window_destroy_frame): only bump
unmaps_pending if the window was mapped
(meta_window_ensure_frame): ditto
* src/keybindings.c: change arrow key bindings to use Ctrl+Alt not
just Alt, and add debug mode key bindings
* src/stack.c (meta_stack_get_default_focus_window): don't choose
a default focus window with unmaps pending, since we probably just
unmapped it.
* src/display.c (event_callback): move notify_focus on UnmapNotify
after the window_free check, so we can move focus to another
window when we unmanage
* src/window.c (meta_window_hide): invalidate work areas when
hiding a window with struts
(meta_window_free): invalidate work areas when unmanaging a window
with struts
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-09 Havoc Pennington <hp@pobox.com>
* src/main.c (main): move SM init a bit later in the process, and
init prefs
* src/session.c: fix no SM case (though I hardly know why I'm
bothering)
* src/main.c (main): call bindtextdomain
* src/util.h (_): actually call gettext
* configure.in: put in AM_GLIB_GNU_GETTEXT and gconf stuff
* src/prefs.c: Preferences - this marks the beginning of our doom.
None of them are actually implemented yet, but we monitor
some stuff from gconf.
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/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-10-07 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_client_message): don't allow
shade/maximize/minimize for windows that don't support those
operations. (minimizing the panel = bad)
2001-10-04 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (meta_change_keygrab): add code to grab all
modifier combinations, so keybindings work with NumLock etc.
* src/menu.c (meta_window_menu_new): remove newlines from menu
items
2001-09-27 Havoc Pennington <hp@pobox.com>
* src/session.c (save_state): when encoding text for session file,
escape XML entities
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-24 Havoc Pennington <hp@pobox.com>
* src/window.c (constrain_position): force fullscreen windows to
be at 0,0
* src/ui.c: use NULL colormap to get bitmaps, requires
very latest GTK from CVS or it will spew warnings
and not work.
* src/window.c (constrain_size): disallow larger than screen in
all cases, even if user has performed a resize operation.
(constrain_position): keep window boxed onscreen.
* src/keybindings.c (meta_display_process_key_event): revert an
earlier change that disabled global keybindings when a grab is in
effect; instead, only disable global keybindings if a _keyboard_
grab is in effect. The earlier change was just a broken
workaround, the problems it fixed should have been solved by the
addition of XGrabKeyboard() on the metacity keyboard grabs.
This should fix the problem with
pick-up-window-and-move-to-another-desktop.
2001-08-03 Havoc Pennington <hp@pobox.com>
* src/keybindings.c: Add Alt + left/right arrow to
move between workspaces.
* src/screen.c (set_wm_check_hint): put property pointing back to
itself on the _WIN_SUPPORTING_WM_CHECK window.