CVS2003-05-29 Rob Adams <robadams@ucla.edu>
Use a new property _METACITY_SENTINEL to eliminate a race
condition that causes focus to behave badly with sloppy/mouse
focus when lots of windows are mapped/unmapped, such as with a
workspace switch. The EnterNotify events on a display are ignored
until the PropertyNotify sent after all the window maps is
received. This is a fix for #110970.
* src/display.[ch]: New _METACITY_SENTINEL atom.
(event_callback): ignore EnterNotify if the sentinel isn't clear,
and decrement the sentinel counter when the PropertyNotify is
received.
(meta_display_increment_focus_sentinel): new function. Increments
the sentinel counter and updates the property on a root window on
this display.
(meta_display_decrement_focus_sentinel): Decrement the sentinel
counter.
(meta_display_focus_sentinel_clear): returns whether the sentinel
counter is zero.
* src/window.c (idle_calc_showing): after showing windows, call
meta_display_increment_focus_sentinel on each display for windows
to be shown.
* src/workspace.[ch] (meta_workspace_activate_with_focus): new
function activates a workspace and focuses a particular window
after the workspace is activated.
(meta_workspace_activate): now just a wrapper for
meta_workspace_activate_with_focus
* src/keybindings.c: use new meta_workspace_activate_with_focus
function to ensure that focus will follow the focused window
through the workspace switch.
: ----------------------------------------------------------------------
2003-02-23 Havoc Pennington <hp@pobox.com>
Patch from Rob Adams addresses #95014 (placement issues),
makes first fit algorithm "center tile", adds most code
for per-xinerama workspaces (#86682) but disables it for now.
* src/workspace.c (meta_workspace_get_work_area_for_xinerama)
(meta_workspace_get_work_area_all_xineramas): new xinerama
functions, maintain workspace->work_areas with a different
work area for each xinerama. However for now all the work
areas are the same, because haven't quite figured out how
_NET_WM_STRUT is supposed to work
* src/window.c: adapt to new meta_window_* xinerama APIs
(meta_window_get_work_area_current_xinerama): new xinerama
API
(meta_window_get_work_area_for_xinerama): new xinerama API
(constrain_position): be a bit more clever about which xinerama's
work area we choose to use.
* src/stack.c: adapt to new Xinerama API
* src/screen.c (reload_xinerama_infos): invalidate all work areas
(meta_screen_get_xinerama_for_rect): new function
(meta_screen_window_intersects_xinerama): new function
* src/place.c (find_first_fit): change to use
"center tiling" (center a screen full of tiled windows,
rather than aligning them top left). Adapt to new
xinerama functions.
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/workspace.c (meta_workspace_get_name): new function,
and remove workspace->name field, instead just get the
name from prefs each time
* src/screen.c (meta_screen_update_workspace_names): update the
gconf key to persist workspace names here, instead of changing
the names we use
* src/util.c (topic_name): add META_DEBUG_PREFS
* src/prefs.c: change NUM_COMMANDS to 32 to allow more custom
commands, implement workspace names
* src/metacity.schemas.in: add workspace_names/name_NN gconf keys.
2002-10-16 Havoc Pennington <hp@redhat.com>
* src/workspace.c: workspaces are all per-screen now, fix
accordingly
* src/core.c: fix multihead workspace stuff
* src/keybindings.c: multihead-rama
* src/screen.c (meta_screen_show_desktop): new functions to
replace display equivalents
* src/display.c (meta_display_get_workspace_by_screen_index): get
rid of this
(meta_display_get_workspace_by_index): get rid of this
(event_callback): handle _NET_SHOWING_DESKTOP message per-screen
* src/screen.c (meta_screen_get_workspace_by_index): new function
* src/screen.h (struct _MetaScreen): move workspace list, and
showing_desktop flag, to be per-screen
* src/window.c (window_query_root_pointer): return whether pointer
is on window's screen
(meta_window_handle_mouse_grab_op_event): don't use coordinates
from other screens when updating a window operation on the current
screen. I can't believe no one has reported this...
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>
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-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-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-09 Havoc Pennington <hp@pobox.com>
* src/workspace.c (meta_workspace_free): update number of
workspaces hint
* src/screen.c (update_num_workspaces): implement number of
workspaces setting
* src/window.c (meta_window_configure_request): honor configure
requests on windows of type NORMAL, but still be mean to those of
type DIALOG
* src/main.c (main): add more log domains to those we set a log
handler for, and only set warnings fatal in debug mode
* src/metacity.schemas: add number of workspaces setting
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