2003-06-12 Havoc Pennington <hp@pobox.com>
* src/display.c (event_callback): make raise-on-click explicitly
only happen in click to focus mode.
* src/window.c (update_move): apply patch from Jurg Billeter to
allow you to "shake loose" maximized windows and move them between
Xinerama heads. #93586
* src/display.c: delete event_queue_callback
* src/display.h (struct _MetaDisplay): get rid of
grab_current_window_pos and grab_current_root_[xy] as I could find
absolutely no code using them for anything. They were just sort of
randomly assigned to for no apparent reason.
* src/display.c (event_callback): double-click timeout is per
screen, so get the screen and pass screen->ui to
meta_ui_get_double_click_timeout()
* src/ui.c (meta_ui_get_double_click_timeout): take a MetaUI
argument so we get the right settings for each screen
(meta_ui_get_drag_threshold): new function
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-05-29 Ray Strode <halfline@hawaii.rr.com>
Get and use double-click speed from GtkSettings (Bug #103218).
* src/ui.c, src/ui.h:
add function meta_ui_get_double_click_timeout for looking up
the global double-click speed.
* src/display.c, src/display.h: remove double_click_time
field from MetaDisplay and use meta_ui_get_double_click_timeout
instead.
2003-05-20 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (meta_change_keygrab): the mask
display->ignored_modifier_mask wasn't being bound,
due to "<" instead of "<=" (most people didn't notice
as display->ignored_modifier_mask included Scroll_Lock).
Red Hat bugzilla #91301 reported by Youssef Makki
* src/display.c (meta_change_button_grab): make corresponding
change for button grabs.
2003-05-16 Havoc Pennington <hp@redhat.com>
* src/window.c (meta_window_new): fill in window->desc sooner
since we use it sooner now.
* src/display.c (meta_display_open): init
display->grab_update_alarm
* src/window.c (meta_window_new): initialize the always_sticky
field
(meta_window_new): initialize the update_icon_queued field
Patch from Julien Olivier bug #92335 for converting "show desktop
mode" to "all windows are minimized" when you open a new window,
instead of just mapping all the windows again.
* src/window.c (meta_window_activate): minimize all windows before
coming out of show desktop mode.
(meta_window_unminimize): don't toggle show desktop mode here
* src/screen.c (meta_screen_minimize_all_except): new function
2003-03-13 Rob Adams <robadams@ucla.edu>
Make it so that the alt-tabbing won't try to go to a minimized
window by default. Fix for #107071.
* display.c (meta_display_get_tab_list): use a GList instead of a
GSList
(meta_display_get_tab_next): use meta_display_get_tab_list to
decide what the next/previous tab window should be.
* display.h (meta_display_get_tab_list): update function prototype
to return GList instead of GSList.
* screen.c (meta_screen_ensure_tab_popup): update function to deal
with GList returned by meta_display_get_tab_list instead of GSList.
2003-02-24 Mark McLoughlin <mark@skynet.ie>
Take control of the panel's global keybindings. The
screenshot utility is hooked up using a special case
run_command and the menu and run dialog bindings are
done using the _GNOME_PANEL_ACTION ClientMessage
protocol.
* src/display.[ch]: (meta_display_open): add some atoms.
* src/keybindings.c:
(handle_panel_keybinding): impl to handle a keybinding
by sending an action message to the panel.
* src/metacity.schemas.in: add schemas for the panel and
screenshot keybindings and the screenshot commands.
* src/prefs.[ch]: (update_command),
(meta_prefs_get_gconf_key_for_command): impl special case
handling for the screenshot commands. They are stored at
the the end of the commands array but have named keys.
2003-02-22 Havoc Pennington <hp@pobox.com>
* src/display.c (event_callback): fix to unfocus window only when
you leave the window frame, not when you leave the window itself,
unless window has no frame. #100248 fix from Orien Vandenbergh
2003-02-22 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_get_tab_next): when tabbing
backward, we are still tabbing *from* the most recently used
window, not from the least recently used window.
* src/keybindings.c (struct _MetaKeyBinding): make keycode
unsigned to match XEvent
Patch for #84999 based on patch from Mark McLoughlin
* src/prefs.c: add an add_shift field to MetaKeyPref to
add shift when grabbing the given keybinding.
* src/keybindings.c (rebuild_screen_binding_table)
(rebuild_window_binding_table): refactor to share code,
and honor add_shift field in MetaKeyPref
2003-01-21 Havoc Pennington <hp@pobox.com>
Fix for the "mangles focus window when switching workspaces
and using mouse focus" bug
* src/stack.c (meta_stack_get_default_focus_window_at_point): new
function
* src/screen.c (meta_screen_focus_mouse_window): new function
(meta_screen_focus_default_window): new function
* src/workspace.c (meta_workspace_activate): use the
new meta_screen_focus_default_window()
2003-01-17 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_handle_mouse_grab_op_event): fix event
compression code to use GDK algorithm suggested by Owen, should be
more efficient.
2003-01-21 Havoc Pennington <hp@redhat.com>
* src/display.c (event_callback): only hop window to the current
workspace if the window was previously minimized. Should keep
mozilla from popping windows over to your current workspace.
2003-01-20 Havoc Pennington <hp@redhat.com>
Attempt to fix#85916
* src/keybindings.c (primary_modifier_still_pressed): new function
(handle_workspace_switch): handle modifier release prior to
getting the grab
(do_choose_window): handle modifier release prior to getting the
grab
* src/keybindings.c (grab_keyboard): properly return failure
if the GrabKeyboard doesn't work
2003-01-05 Havoc Pennington <hp@pobox.com>
* src/frames.c (meta_frames_apply_shapes): handle
the client having a shape mask, fixes#101806
* src/core.c (meta_core_get_client_xwindow): new function
* src/frame.c, src/frame.h: keep a flag for whether we need to
update the frame shape
* src/window.c (meta_window_new): select for ShapeNotify
* src/display.h, src/display.c: actually query the shape
extension, instead of just using it all over the place.
* src/prefs.c (update_application_based): don't let people turn on
application_based, as it just causes funky bugs. We can reenable
the pref when/if it ever does something useful.
2003-01-03 Havoc Pennington <hp@redhat.com>
* src/display.c: include the Xrandr header file
* src/window.c (meta_window_fill_horizontal)
(meta_window_fill_vertical): maximize to work area, not entire
screen. doh.
2002-12-18 Havoc Pennington <hp@redhat.com>
* src/window.c (meta_window_new): select ColormapChangeMask
on toplevel windows, maybe a partial fix for #101478
2002-12-17 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_begin_grab_op): don't use "(null)"
for null pointers, use "none", so I can distinguish
glibc-generated (null) which is a bug.
(key_event_description): ditto
(meta_display_begin_grab_op): ditto
* src/window.c (update_sm_hints): ditto
* src/keybindings.c (reload_modmap): ditto
(meta_display_process_key_event): ditto
2002-12-13 Havoc Pennington <hp@redhat.com>
* src/tools/Makefile.am (Desktop_in_files): only install .desktop
file for metacity-properties if we actually install
metacity-properties
* src/display.c (event_callback): not focusing on button 2 click
was crack, revert that change.
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-12-08 Havoc Pennington <hp@pobox.com>
* src/prefs.c (meta_prefs_get_application_based): make this always
return FALSE for now, to avoid bug reports.
* src/util.c (ensure_logfile): put "opened log file" message on
stderr so it will normally land in ~/.xsession-errors
* configure.in: remove extra AC_ARG_PROGRAM
* src/display.c (event_callback): handle the toggle-verbose message
* src/tools/metacity-message.c: add a toggle-verbose message, been
meaning to do this for a while.
* src/util.c (meta_set_verbose): if verbose mode is enabled and we
don't support it, then exit.
* src/prefs.c: allow building without gconf (currently means some
prefs are no-ops)
* src/util.c, src/util.h: support defining macros to
kill all verbose output entirely. (Removes the code and strings
associated with it)
* configure.in: don't get METACITY_PROPS_LIBS if not building the
config dialog.
(HAVE_GCONF): allow building sans gconf, if you are size-sensitive
and not using gnome.
(WITH_VERBOSE_MODE): add ability to disable all the verbose debug
spew strings, to shrink the binary.
(--disable-sm): allow SM support to be forced on or off
(--disable-startup-notification): allow forcing this on or off
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-22 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_change_workspace): patch from
Hidetoshi Tajima to move a window's transients when moving
the window between workspaces. #98900
2002-11-21 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_open): init ret_to to
RevertToPointerRoot out of sheer paranoia; don't want no
RevertToNone in my code!
2002-11-06 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (grab_keys): push an error trap around the
whole window-key-grab loop
(ungrab_all_keys): avoid requiring return value from the error
trap, unless in debugging mode
(regrab_window_bindings, regrab_screen_bindings): push traps
around the loops, for efficiency
* src/display.c (event_callback): fix from Padraig O'Briain to
compress extra MappingNotify events to avoid extra work.
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_grab): remove XSync calls from here
(meta_display_ungrab): remove XSync from here, but put in
an XFlush to be sure we get the ungrab sent.
* src/util.c (meta_topic): track sync count here
* src/errors.c: move sync count out of here
Throughout: error spew on all XSync() calls
* src/run-metacity.sh: don't set METACITY_DEBUG
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.
2002-10-28 Havoc Pennington <hp@pobox.com>
* src/window.c, src/display.c: store the window menu on the
display and blow it away when a window closes, so we don't
get funny stuck menus. Patch from Martin Garton #87514
2002-10-25 Havoc Pennington <hp@pobox.com>
Add "busy cursor on app startup" support, conditionally - works
only if libstartup-notification is found, and in practice requires
a GTK patch that's not in yet.
* src/screen.c: monitor startup events and set busy cursor if
appropriate
* src/display.c (meta_display_open): create SnDisplay
* configure.in: check for startup notification,
and add the cute "configure summary" at the end
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-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-10-14 Federico Mena Quintero <federico@ximian.com>
* src/display.c (event_callback): Ignore EnterNotify events when
the detail field is set to NotifyInferior. Fixes#95747.
2002-10-11 Havoc Pennington <hp@redhat.com>
* src/display.c (event_callback): don't raise window on button 2
click, only on button 1 and button 3.
* src/frames.c (meta_frames_button_press_event): lower on button 2
press on frame
* src/core.c (meta_core_user_lower): new function
2002-10-07 Havoc Pennington <hp@redhat.com>
Add a modifier key preference for the Alt+click stuff.
Can be set to "disabled" as well.
* src/run-metacity.sh: load .Xmodmap in the Xnest if it exists
* src/display.c (meta_display_ungrab_window_buttons): ungrab
AnyModifier in case the modifier changed since we grabbed
(meta_display_open): rearrange code to use meta_display_close() to
mop up when we can't find any screens, avoiding the need to
keep the bail-out code in sync with meta_display_close.
* src/keybindings.c (devirtualize_modifiers): move this function
to a public place in display.c
* src/metacity.schemas.in: add setting for the modifier key
to use for Alt+left/middle/right click.
* src/prefs.c (update_binding): add a missing newline to a warning
(meta_prefs_get_mouse_button_mods): new function
* src/ui.c (meta_ui_parse_modifier): new function
2002-10-04 Havoc Pennington <hp@redhat.com>
* src/display.c (event_callback): do XRRUpdateConfiguration()
if we have RandR extension, else poke in Xlib's screen struct to
update the screen size.
* configure.in: fix a bogus overwrite of cppflags,
add a check for RandR extension
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>
Patch from Keith Packard to handle root window resizes.
* src/screen.c (reload_xinerama_infos): factor out Xinerama code
(meta_screen_resize): implement this, to be called from display.c
on screen resize
* src/display.c (event_callback): handle ConfigureNotify on root
windows
2002-09-27 Havoc Pennington <hp@redhat.com>
Try to handle Solaris Xinerama, all coded blind, someone
on Solaris will need to debug the typos.
* src/display.c: updates for Solaris Xinerama
* src/screen.c: updates for Solaris Xinerama
* configure.in: make Xinerama check more complicated to catch
Solaris Xinerama
2002-09-23 Havoc Pennington <hp@pobox.com>
* src/main.c (main): re-enable the log handler, maybe it will
break something, I don't remember why I turned it off.
* src/display.c: s/_NET_SHOW_DESKTOP/_NET_SHOWING_DESKTOP/ which
is what's in the spec
2002-09-22 Havoc Pennington <hp@pobox.com>
* src/window.c (recalc_window_features): small reordering of
code
* src/display.c (meta_spew_event): more spew for MapNotify,
UnmapNotify
* src/window.c (recalc_window_features): spew more stuff
* src/display.c (meta_spew_event): spew override_redirect field of
ConfigureNotify
2002-09-03 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_get_tab_current): new function
* src/keybindings.c (do_choose_window): apply modified patch from
JeyaSudha to still display tab popup if only one window is on the
desktop.
2002-08-25 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_open): _NET_SUPPORTING_WM_CHECK is
supposed to have type WINDOW not CARDINAL. reported by
Ben Jansens
2002-08-20 Havoc Pennington <hp@redhat.com>
* src/frames.c (get_control): if in the title rect check for y
<= TOP_RESIZE_HEIGHT
* src/display.c (meta_spew_event): put x/y coordinates in spew for
enter/leave notify
* src/frames.c (meta_frames_motion_notify_event): move cursor
changing from here to update_prelit_control so it happens on enter
notify as well
(get_control): change test "y < TOP_RESIZE_HEIGHT" to
"y <= TOP_RESIZE_HEIGHT"
* src/Makefile.am (EXTRA_DIST): include .in files in EXTRA_DIST
2002-08-15 Havoc Pennington <hp@pobox.com>
* src/window.c (recalc_window_features): leave has_fullscreen_func
set to TRUE if the window is screen sized and undecorated, even if
the window isn't resizable. idea from Christian - Manny Calavera -
Neumair
* src/keybindings.c (handle_toggle_fullscreen)
(handle_toggle_maximize): these disabled fullscreen/maximize if
the window wasn't resizable, should have used has_fullscreen_func
has_maximize_func instead.
2002-08-15 Havoc Pennington <hp@pobox.com>
* src/keybindings.c: implement raise/lower
* src/metacity.schemas.in: add raise/lower
* src/prefs.c: add "raise" and "lower" prefs to keybindings
* src/display.c (meta_display_set_grab_op_cursor): assert that
the screen arg is non-NULL in appropriate cases
2002-08-14 Jayaraj Rajappan <jayaraj.rajappan@wipro.com>
* src/display.c (meta_display_set_grab_op_cursor):
In XGrabPointer, set the confine_to argument to the root window
of the screen the window is on.
* src/display.h: add screen argument.
* src/window.c (meta_window_update_resize_grab_op):
pass screen argument as NULL.