1
0
Fork 0
Commit graph

308 commits

Author SHA1 Message Date
Havoc Pennington
72b08c82b1 sort source files into these directories according to which part of the WM
2007-12-19  Havoc Pennington  <hp@redhat.com>

	* src/ui, src/core, src/include: sort source files into these
	directories according to which part of the WM they are supposed to
	be in. In an eventual plan, we should also create
	src/compositor/render, src/compositor/fallback and move some of
	the compositor stuff into that.
	
	* autogen.sh: require a newer automake, so we don't have to use
	a recursive build

	* src/ui/tabpopup.c: put in a hack to make the build temporarily
	work, want to commit the large rearrangement before fixing this
	not to include workspace.h or frame.h

	* src/core/iconcache.c (meta_read_icons): temporarily break this
	to get the build to work, want to commit the large rearrangement
	before fixing this file not to include theme.h


svn path=/trunk/; revision=3491
2007-12-19 21:17:50 +00:00
Iain Holmes
c2a6eeaf5e Merge compositor branch.
2007-12-18  Iain Holmes  <iain@gnome.org>

        * configure.in, src/theme.c, src/display.c,
      src/theme.h, src/display.h, src/theme-parser.c,
      src/compositor.c, src/c-screen.c, src/compositor.h,
      src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
      src/screen.h, src/c-window.c, src/c-window.h,
      src/theme-viewer.c, src/Makefile.am: Merge compositor branch.


svn path=/trunk/; revision=3483
2007-12-19 03:49:50 +00:00
Thomas Thurman
8f2b9cb4a9 Refactor thrice-duplicated queue code in window.c. Closes #376760.
2007-06-10  Thomas Thurman  <thomas@thurman.org.uk>

        Refactor thrice-duplicated queue code in window.c. Closes #376760.

        * src/window.c (meta_window_queue, meta_window_unqueue):
        New functions.
        * src/window.[ch] (meta_window_unqueue_*, meta_window_queue_*):
        Removed functions.
        * src/window.c (meta_window_new_with_attrs, meta_window_free,
        meta_window_flush_calc_showing, queue_calc_showing_func,
        meta_window_minimize, meta_window_unminimize, meta_window_maximize,
        meta_window_make_fullscreen, meta_window_shade,
        meta_window_unshade, meta_window_move_resize_internal,
        window_stick_impl, window_unstick_impl,
        meta_window_client_message, process_property_notify): Modified to
        use new queueing functions.
        * src/window.c (idle_move_resize, idle_update_icon,
        idle_calc_showing): update to receive queue number from pointer.
        * src/window.h (MetaQueueType): new enum.
        * src/window.h (MetaWindow): *_queued replaced with is_in_queue
        bitfield.
        * src/core.c (meta_core_queue_frame_resize):
        * src/display.c (event_callback,
        meta_display_queue_retheme_all_windows): Using new queueing functions.
        * src/frame.c (meta_window_destroy_frame): Using new queueing functions.
        * src/screen.c (queue_resize, meta_screen_resize_func,
        queue_windows_showing): Using new queueing functions.
        * src/window-props.c (reload_mwm_hints, reload_wm_hints,
        reload_transient_for): Using new queueing functions.
        * src/workspace.c (meta_workspace_add_window,
        meta_workspace_remove_window, meta_workspace_queue_calc_showing,
        meta_workspace_invalidate_work_area): Using new queueing functions.


svn path=/trunk/; revision=3236
2007-06-11 01:15:33 +00:00
Elijah Newren
3f7d729978 Preserve stacking order across restarts.
2007-04-15  Elijah Newren  <newren gmail com>

	Preserve stacking order across restarts.

	* src/display.c (meta_display_unmanage_windows_for_screen):
	unmap windows in stacking order so that stacking is preserved upon
	shutdown

	* src/display.[ch] (meta_display_stack_cmp):
	* src/session.c (stack_cmp, save_state):
	rename stack_cmp() -> meta_display_stack_cmp() and move it to a
	different function so that it can be used in both
	session.c:save_state() and
	meta_display_unmanage_windows_for_screen()

svn path=/trunk/; revision=3197
2007-04-16 04:57:32 +00:00
Elijah Newren
7626f74b85 Advertise support of Above and Below operations (assuming the proposed
2007-04-11  Elijah Newren  <newren gmail com>

	Advertise support of Above and Below operations (assuming the
	proposed EWMH additions of _NET_WM_ACTION_(ABOVE|BELOW) will be
	accepted, otherwise these changes will have to be modified).  Part
	of #115247.

	* src/display.[ch] (meta_display_open, struct MetaDisplay):
	* src/screen.c (set_wm_check_hint):
	Add support for _NET_WM_ACTION_ABOVE and _NET_WM_ACTION_BELOW

	* src/window.c (set_allowed_actions_hints):
	add active_above and action_below

svn path=/trunk/; revision=3190
2007-04-11 17:15:54 +00:00
Elijah Newren
b8f89db4d1 Add support for _NET_MOVERESIZE_WINDOW. #344521.
2007-04-09  Elijah Newren  <newren gmail com>

	Add support for _NET_MOVERESIZE_WINDOW.  #344521.

	* src/display.c (handle_net_moveresize_window, event_callback):
	Remove handle_net_moveresize_window() and the call to it; this
	code was highly buggy, though to be fair it was never tested and
	had simply been put into the code in commented out form.

	* src/screen.c (set_supported_hint):
	add atom_net_moveresize_window

	* src/window.[ch]:
	(meta_window_configure_request, meta_window_move_resize_request):
	Split out the moving/resize part of the configure request and put
	it into meta_window_move_resize_request

	(meta_window_client_message):
	check for NET_MOVERESIZE_WINDOW messages and call
	meta_window_move_resize_request() with the appropriate parameters
	to handle them

	(meta_window_move_resize_internal):
	fix some of the big comment at this function -- it wasn't quite
	right, use the passed in gravity instead of
	window->size_hints.win_gravity when calling adjust_for_gravity()
	to make sure the correct adjustments are used.

	(meta_window_get_gravity_position,
	 meta_window_get_geometry, meta_window_move_resize_request):
	add a gravity parameter to meta_window_get_gravity_position and
	have it use that gravity instead of window->size_hints.win_gravity

svn path=/trunk/; revision=3186
2007-04-09 23:00:55 +00:00
Elijah Newren
ebfbef86a0 Remove grab_start_serial, which we expect to be an ancient attempt to
2007-04-08  Elijah Newren  <newren gmail com>

	Remove grab_start_serial, which we expect to be an ancient attempt
	to workaround sloppy/mouse focus bugs that have since been
	correctly fixed.  May fix some race conditions.  May cause nasty
	bugs in sloppy/mouse focus modes.  We'll find out soon enough...
	See #304430.

	* src/display.c (event_callback):
	remove event->xany.serial >= display->grab_start_serial in several
	event callback handlers

	* src/display.[ch] (struct _MetaDisplay, meta_display_begin_grab_op):
	* src/keybindings.c (do_choose_window, handle_workspace_switch):
	* src/frames.c (meta_frames_button_press_event):
	* src/core.[ch] (meta_core_begin_grab_op):
	* src/window.c (meta_window_client_message, meta_window_begin_grab_op):
	don't require an event_serial to be passed to
	meta_display_begin_grab_op () and don't record it anymore.

	* src/ui.c (struct _EventFunc, filter_func,
	  meta_ui_get_last_event_serial)
	* src/core.h (meta_ui_get_last_event_serial):
	remove meta_ui_get_last_event_serial() function (don't ask me why
	it was declared in core.h) and the last_even_serial field of
	_EventFunc

svn path=/trunk/; revision=3182
2007-04-09 05:49:57 +00:00
Elijah Newren
addf369006 Fix move/resize events in relation to combinations of ConfigureRequest and
2007-04-08  Elijah Newren  <newren gmail com>

	Fix move/resize events in relation to combinations of
	ConfigureRequest and WM_NORMAL_HINTS change notifications (plus a
	few code cleanups).  Fixes #426519.

	* src/window.c (meta_window_move_resize_now):
	move to the user_rect position, not some weird combination of rect
	and user_rect

	* src/window.c (meta_window_configure_request):
        set user_rect in response to ConfigureRequest events (after the
	ConfigureRequest values have been constrained) and add a big
	comment explaining this change, remove unused only_resize variable
	and irrelevant huge FIXME comment about it

	* src/window.[ch] (meta_window_get_client_root_coords):
	new function

	* src/display.c (meta_display_begin_grab_op):
	* src/keybindings.c (process_keyboard_move_grab):
	* src/window.c (meta_window_unmaximize,
	  meta_window_move_resize_internal, meta_window_begin_wireframe,
	  update_move, meta_window_refresh_resize_popup,
	  warp_grab_pointer)
	combine multi-step client rect root coord setting into a single
	function call to meta_window_get_client_root_coords()

svn path=/trunk/; revision=3181
2007-04-09 03:43:55 +00:00
Elijah Newren
9cae11fd9e _NET_ACTIVE_WINDOW is a single xwindow id, not two.
2007-04-03  Elijah Newren  <newren gmail com>

	* src/display.c (meta_display_update_active_window_hint):
	_NET_ACTIVE_WINDOW is a single xwindow id, not two.

svn path=/trunk/; revision=3152
2007-04-03 22:26:47 +00:00
Elijah Newren
81e32cfa32 Clean up event mask handling and meta_create_offscreen_window, to prevent
2007-03-31  Elijah Newren  <newren gmail com>

	Clean up event mask handling and meta_create_offscreen_window, to
	prevent nasty metacity/gdk interactions causing hangs. See #354213.

	* src/screen.[ch] (meta_create_offscreen_window):
	* src/display.c (meta_display_open):
	* src/screen.c (meta_screen_new):
	Add a valuemask parameter to meta_create_offscreen_window
	
	* src/display.c (meta_display_open):
	make it explicit that we can't rely on PropertyNotify events for
	the leader_window due to nasty metacity/gdk interaction

	* src/session.c (warn_about_lame_clients_and_finish_interact):
	remove cut-and-paste code for timestamp pinging and just call
	meta_display_get_current_time_roundtrip

svn path=/trunk/; revision=3137
2007-03-31 23:34:36 +00:00
Elijah Newren
6e007baaa8 Add support for _NET_WM_USER_TIME_WINDOW in order to cut down on context
2007-03-30  Elijah Newren  <newren gmail com>

	Add support for _NET_WM_USER_TIME_WINDOW in order to cut down on
	context switches.

	* src/display.c (meta_display_open):
	* src/display.h (struct _MetaDisplay):
	* src/screen.c (set_supported_hint):
	new atom

	* src/display.c (meta_display_open,
	  meta_display_get_current_time_roundtrip):
	* src/display.h (struct _MetaDisplay):
	create a dedicated timestamp pinging window instead of reusing
	display->leader_window

	* src/display.c (event_callback):
	* src/window-props.c (reload_net_wm_user_time_window):
	* src/window.c (meta_window_new_with_attrs, meta_window_free,
	  process_property_notify):
	* src/window.h (struct _MetaWindow):
	monitor property notify events on _NET_WM_USER_TIME_WINDOW windows too
	
	* src/window-props.[ch]:
	new meta_window_reload_propert(y|ies)_from_xwindow() functions

	* src/window-props.[ch]
	  (init_net_wm_user_time_window, reload_net_wm_user_time_window,
	  meta_display_init_window_prop_hooks):
	* src/window.c (meta_window_new_with_attrs):
	new hooks to handle new atom

svn path=/trunk/; revision=3134
2007-03-31 05:19:41 +00:00
Carlo Wood
d79a571d0a Fix cases when titlebar is allowed offscreen and shouldn't be (and
2006-10-13  Carlo Wood <carlo@alinoe.com>

	Fix cases when titlebar is allowed offscreen and shouldn't be (and
	vice-versa).  #333995.

	* src/display.[ch] (struct _MetaDisplay): add grab_frame_action
	member

	* src/display.[ch] (meta_display_begin_grab_op):
	* src/window.[ch] (meta_window_begin_grab_op):
	* src/core.[ch] (meta_core_begin_grab_op):
	Add frame_action parameter (core & window versions pass it on to
	display)

	* src/display.c (event_callback):
	* src/window.c (meta_window_begin_grab_op,
	  meta_window_client_message, menu_callback):
	* frames.c (meta_frames_button_press_event):
	* keybindings.c (do_choose_window, handle_begin_move,
	  handle_begin_resize, handle_workspace_switch):
	Pass whether the action should be considered a 'frame_action',
	which will be used to determine whether to force the titlebar to
	remain onscreen, to meta_*_begin_grab_op

	* constraints.c (constrain_titlebar_visible):
	Replace previous ugly hack by using grab_frame_action (and whether
	the action is a user action) to determine whether to enforce the
	titlebar_visible constraint.
2006-10-13 00:28:34 +00:00
Elijah Newren
c4fa0d118c Don't require a push/pop trap around
2006-10-01  Elijah Newren  <newren gmail com>

	* src/display.c (meta_display_set_input_focus_window):
	* src/window.c (meta_window_focus):
	Don't require a push/pop trap around
	meta_display_set_input_focus_window(), but rather move the
	push/pop into that function surrounding the XSetInputFocus() call
	directly.  Follow up to #358514.
2006-10-02 04:08:33 +00:00
Elijah Newren
0201fcfc6c Stick an emacs comment directive at the beginning of all the code files so
2006-10-01  Elijah Newren  <newren gmail com>

	* src/*.[ch]: Stick an emacs comment directive at the beginning of
	all the code files so that people using emacs will be more likely
	to get coding style correct in their patches.  We still need a
	similar vi directive.  #358866
2006-10-01 22:30:10 +00:00
Elijah Newren
07e4cacf14 Patch from Carlo Wood to ensure that maximized and minimized properties
2006-10-01  Elijah Newren  <newren gmail com>

	Patch from Carlo Wood to ensure that maximized and minimized
	properties are maintained across restarts.  #358042.

	* src/constraints.c (place_window_if_needed): fix up partial
	maximization handling and add minimize_after_placement handling.

	* src/display.[ch] (struct MetaDisplay, meta_display_open): add a
	new display->display_opening flag to allow handling startup
	differently where needed.

	* src/window-props.c (reload_net_wm_state): handle
	_net_wm_state_hidden as well, setting
	window->minimize_after_placement appropriately

	* src/window.[ch] (struct MetaWindow, meta_window_new_with_attrs):
	add a window->minimize_after_placement field

	* src/window.c (meta_window_new_with_attrs): only unminimize the
	window and its transients if the display isn't being opened,
	(unmaximize_window_before_freeing): don't reset the state unless
	the window is becoming withdrawn, if the screen is being closed be
	sure to save the unmaximized state of the window so the next
	window manager can restore it
2006-10-01 21:59:09 +00:00
Elijah Newren
b694312f1c Fix longstanding focus bug with mouse (not sloppy) focus mode with popup
2006-10-01  Elijah Newren  <newren gmail com>

	Fix longstanding focus bug with mouse (not sloppy) focus mode with
	popup override-redirect windows, particularly mozilla and
	firefox's location bar autocompletion.  #357695.

	* src/display.c (event_callback -- EnterNotify & LeaveNotify events):
	for mouse focus, defocus the focused window when the mouse enters
	the desktop window rather than when the mouse leaves the focused
	window.

	* doc/how-to-get-focus-right.txt:
	update for the slightly nuanced definition of mouse focus (people
	without a DESKTOP window like nautilus get sloppy focus behavior
	now)
2006-10-01 18:10:24 +00:00
Elijah Newren
5c587726ae Partial audit to fix timestamp usage. One step towards fixing #355180; see
2006-09-18  Elijah Newren  <newren gmail com>

	Partial audit to fix timestamp usage.  One step towards fixing
	#355180; see important comments in that bug.

	* src/core.[ch] (meta_core_unshade, meta_core_shade):
	* src/delete.c (meta_window_present_delete_dialog,
	  delete_ping_timeout_func):
	* src/display.[ch] (meta_display_open, meta_display_close,
	  event_callback, meta_display_begin_grab_op,
	  process_selection_clear, meta_display_unmanage_screen,
	  meta_display_unmanage_windows_for_screen):
	* src/frames.c (meta_frames_button_press_event):
	* src/keybindings.c (handle_toggle_shade):
	* src/main.c (main):
	* src/screen.[ch] (update_num_workspaces, meta_screen_new,
	  meta_screen_free, prefs_changed_callback):
	* src/window.[ch] (meta_window_free, finish_minimize,
	  implement_showing, meta_window_show, meta_window_maximize,
	  meta_window_make_fullscreen_internal,
	  meta_window_unmake_fullscreen, meta_window_shade,
	  meta_window_unshade, window_activate, send_sync_request,
	  meta_window_client_message, menu_callback,
	  meta_window_update_keyboard_resize):
	Remove usage of CurrentTime, meta_display_get_current_time() and
	meta_display_get_current_time_roundtrip() where possible, or
	document why it isn't possible, or at very least add a FIXME with
	some explanation of my laziness and what needs to be done.
2006-09-18 17:27:24 +00:00
Elijah Newren
3b0478776d Fix issues on 64-bit machines with timestamps by using guint32 (like gtk+
2006-09-13  Elijah Newren  <newren gmail com>

	* src/common.h (MetaWindowMenuFunc):
	* src/core.[ch] (meta_core_user_lower_and_unfocus,
	  meta_core_user_focus, meta_core_show_window_menu,
	  meta_core_begin_grab_op, meta_core_end_grab_op):
	* src/delete.c (delete_ping_reply_func, delete_ping_timeout_func,
	  meta_window_delete):
	* src/display.[ch] (struct MetaDisplay, struct MetaPingData,
	  sanity_check_timestamps, meta_display_open, event_callback,
	  meta_spew_event, meta_display_set_grab_op_cursor,
	  meta_display_begin_grab_op, meta_display_end_grab_op,
	  meta_display_ping_timeout, meta_display_ping_window,
	  process_pong_message, timestamp_too_old,
	  meta_display_set_input_focus_window):
	* src/keybindings.[ch] (grab_keyboard, ungrab_keyboard,
	  meta_screen_grab_all_keys, meta_window_grab_all_keys,
	  meta_window_ungrab_all_keys, error_on_generic_command,
	  error_on_command, error_on_terminal_command):
	* src/metacity-dialog.c (on_realize, warn_about_no_sm_support,
	  error_about_command, main):
	* src/screen.[ch] (struct _MetaScreen, meta_screen_new,
	  meta_screen_show_desktop, meta_screen_apply_startup_properties):
	* src/session.c (warn_about_lame_clients_and_finish_interact):
	* src/window.[ch] (struct _MetaWindow,
	  intervening_user_event_occurred, window_activate,
	  meta_window_delete, meta_window_focus,
	  meta_window_send_icccm_message, meta_window_client_message,
	  menu_callback, meta_window_show_menu, struct EventScannerData,
	  check_use_this_motion_notify, meta_window_begin_grab_op,
	  meta_window_set_user_time):
	* src/workspace.[ch] (focus_ancestor_or_mru_window,
	  meta_workspace_activate_with_focus, meta_workspace_activate,
	  meta_workspace_focus_default_window,
	  focus_ancestor_or_mru_window):
	Fix issues on 64-bit machines with timestamps by using guint32
	(like gtk+ does) instead of Time.  #348305
2006-09-13 16:32:33 +00:00
Elijah Newren
189c8b9b11 Fix build when XKB not found. #354211
2006-09-09  Elijah Newren  <newren gmail com>

	* src/display.c (meta_display_open): Fix build when XKB not found.
	#354211
2006-09-10 04:29:14 +00:00
Elijah Newren
555d7dc90c Avoid a stuck grab, preventing focus from being transferred between
2006-09-09  Elijah Newren  <newren gmail com>

	Avoid a stuck grab, preventing focus from being transferred
	between windows.  Thanks to Fryderyk Dziarmagowski for steps to
	reproduce.  Fixes at least part of #354422.

	* src/display.c (meta_display_begin_grab_op,
	meta_display_end_grab_op): pass timestamp to
	meta_screen_ungrab_all_keys, meta_screen_ungrab_all_keys, and
	meta_window_ungrab_all_keys

	* src/keybindings.[ch] (grab_keyboard, ungrab_keyboard): add a
	timestamp parameter and remove call to
	meta_display_get_current_time(), (meta_screen_grab_all_keys,
	meta_screen_ungrab_all_keys, meta_window_ungrab_all_keys): add a
	timestamp parameter and pass it on to grab_keyboard and
	ungrab_keyboard
2006-09-09 20:19:56 +00:00
Elijah Newren
7489dbc34e Allow drags & resizes to be reverted by hitting escape. Based on patch
2006-08-21  Elijah Newren  <newren gmail com>

	Allow drags & resizes to be reverted by hitting escape.  Based on
	patch from Thomas Andersen.  #126497.

	* src/display.c (grab_op_is_mouse_only): new function,
	(meta_display_begin_grab_op): grab the keyboard when moving or
	resizing too so that we can get escape keypresses

	* src/display.h (struct _MetaDisplay): add a comment to remind
	that grab_was_cancelled is only used in wireframe mode

	* src/keybindings.[ch] (process_mouse_move_resize_grab): add new
	function for handling keypresses during mouse-only moving and
	resizing, (meta_window_grab_all_keys): add a timestamp parameter
	and pass it to meta_window_focus(),
	(meta_display_process_key_event): make sure
	process_mouse_move_resize_grab() gets called when needed,
	(process_keyboard_move_grab, process_keyboard_resize_grab):
	rearrange some code slightly and improve the comments to make it
	more readable
2006-08-21 18:38:21 +00:00
Björn Lindqvist
3d661f9bc7 Grab Alt+Shift+Button1 as well to partially fix operation ordering issues
2006-07-24  Björn Lindqvist  <bjourne@gmail.com>

	* src/display.c (meta_display_grab_window_buttons): Grab
	Alt+Shift+Button1 as well to partially fix operation ordering
	issues when trying to snap-move windows.  Part of #112478.
2006-07-24 17:15:32 +00:00
Elijah Newren
db87abfb19 Fix a crash on exit/logout from assuming a compositor would always exist
2006-05-26  Elijah Newren  <newren gmail com>

	* src/display.c (meta_display_close): Fix a crash on exit/logout
	from assuming a compositor would always exist
2006-05-26 16:51:03 +00:00
Søren Sandmann
7592470dab Also use explode when windows close.
Tue May 23 16:36:04 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c (do_effect): Also use explode when windows close.

        * src/c-window.c (meta_comp_window_explode): Add refcounting to
        comp window, and use it in the explosion effect

        * src/effects.h (struct MetaEffect): Add new MetaCloseEffect.

        * src/display.c (event_callback): Run it from the UnmapNotify
        event handler.
2006-05-23 20:38:18 +00:00
Björn Lindqvist
cdb94d7e57 Make mouse cursor when moving windows become a hand. Fixes #337376.
2006-05-22  Björn Lindqvist  <bjourne@gmail.com>

	* common.h (enum MetaCursor):
	* display.c (meta_display_create_x_cursor): Make mouse cursor when
	moving windows become a hand. Fixes #337376.
2006-05-22 16:12:28 +00:00
Søren Sandmann
addc04f463 Delete unused META_PRIORITY_COMPOSITE
Thu May  4 13:30:04 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/ui.h: Delete unused META_PRIORITY_COMPOSITE

	* src/ui.c: Delete argument from meta_ui_get_display().

	* src/c-window.c: Remove the xid->window hashtable and associated
	code.

	* src/c-screen.[ch]: Rename MetaScreenInfo to MetaCompScreen. Put the
	xid->windows table here instaed of as a static variable. Also make
	sure that CompWindows are freed when the screen is unredirected.

	* src/display.c: Delete non USE_GDK_DISPLAY case, as it didn't
	work and hasn't been compiled for a long time.

	* src/display.[ch] (meta_display_open): Remove argument as it was
	always NULL (and couldn't possibly be anything else in the
	USE_GDK_DISPLAY case).
2006-05-04 17:32:26 +00:00
Thomas Thurman
2214fd75d9 Add a tabbing function, bound to alt-f6 by default, to cycle through the
2006-04-14  Thomas Thurman   <thomas@thurman.org.uk>

        Add a tabbing function, bound to alt-f6 by default, to cycle
        through the windows of the current application. Fixes #164831.

        * src/common.h: two new MetaGrabOpts values for group switching
        * src/display.c (ping_data_free, meta_display_in_grab_op,
        IN_TAB_CHAIN): adapt to new MetaGrabOpts
        * src/display.h: new enum value for MetaTabList for group switching
        * src/keybindings.c (meta_display_process_key_event):
        adapt to new MetaGrabOpts
        (process_tab_grab): adapt to new MetaGrabOpts, and use switch
        statement for cancelling instead of if statement
        * src/metacity.schemas.in: new keybindings
        * src/prefs.c, src/prefs.h: handle new keybindings
        * src/window.h: define META_WINDOW_IN_GROUP_TAB_CHAIN macro
2006-04-15 02:05:44 +00:00
Björn Lindqvist
4730cb57bd *** empty log message *** 2006-04-10 08:30:02 +00:00
Søren Sandmann
832968ddd6 Split the ScreenInfo data structure into separate, new files
Wed Mar  3 13:25:03 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c, src/c-screen.[ch]: Split the ScreenInfo data
        structure into separate, new files c-screen.[ch].

        * src/errors.c (x_error_handler): Forward foreign errors to
        foreign displays.

        * src/errors.c (meta_errors_register_foreign_display): Implement
        this function

        * src/errors.h: Add new meta_errors_register_foreign_display()
2006-03-03 15:53:10 +00:00
Søren Sandmann
b1847959b1 Call meta_compositor_begin_move if there is a compositor
Sat Feb 25 11:46:14 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/display.c (meta_display_begin_grab_op): Call
	meta_compositor_begin_move if there is a compositor

	* src/compositor.c (meta_compositor_begin/update/end_move):
	Implement those functions.

	* src/spring-model.[ch]: New files
2006-02-25 16:54:39 +00:00
Søren Sandmann
f6738a930c New function.
Thu Feb 16 15:24:42 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/screen.c (meta_screen_composite_all_windows): New function.

	* src/prefs.[ch], src/metacity.schemas.in: Add new
	compositing_manager key.

	* src/display.c (prefs_changed_callback): Handle
	META_PREF_COMPOSITOR_MANAGER

	* src/display.c (event_callback): Only call
	meta_compositor_process_event() if there is in fact a compositor.

	* src/display.c (enable/disable_compositor): Add code to
	enable/disable compositor at runtime
2006-02-16 20:26:05 +00:00
Thomas Thurman
b5c199c6e6 produce warning when invalid events with no timestamp are received, rather
2006-02-03  Thomas Thurman <thomas thurman org uk>

        * src/display.c (event_callback): produce warning when invalid
        events with no timestamp are received, rather than failing an
        assertion
2006-02-03 18:09:16 +00:00
Elijah Newren
297e0e466f Track the active_screen, (event_callback): If the mouse enters a window on
2006-01-30  Elijah Newren  <newren gmail com>

	* src/display.[ch] (struct MetaDisplay), meta_display_open,
	meta_display_set_input_focus_window,
	meta_display_focus_the_no_focus_window): Track the active_screen,
	(event_callback): If the mouse enters a window on a different
	screen, activate the default window on the new screen.  May need
	to be modified for click-to-focus; we'll wait for feedback.  Fixes
	#319348.
2006-01-30 17:22:14 +00:00
Elijah Newren
405e21a82a change the order of the ||'ed items in the if to avoid using an
2006-01-23  Elijah Newren  <newren gmail com>

	* src/display.c (meta_display_check_threshold_reached): change the
	order of the ||'ed items in the if to avoid using an uninitialized
	value

	* src/prefs.c (meta_prefs_init): fix a couple uninitialized value
	problems
2006-01-24 01:07:41 +00:00
Elijah Newren
6f318f1a75 Fix unitialized value problem when in raise-on-click mode. Søren,
2006-01-20  Elijah Newren  <newren gmail com>

	Fix unitialized value problem when in raise-on-click mode.  Søren,
	#327572.

	* src/display.c (meta_display_check_threshold_reached): make
	function be a no op if raise_on_click!=FALSE

	* src/display.h (struct MetaDisplay): point out that
	grab_initial_[xy] and grab_threshold_movement_reached are only for
	raise_on_click==FALSE mode.
2006-01-20 23:02:24 +00:00
Elijah Newren
af14d9d2a1 Prevent rapidly repeated visual bells from hanging metacity. Fixes
2006-01-20  Elijah Newren  <newren gmail com>

	Prevent rapidly repeated visual bells from hanging metacity.
	Fixes #322032.

	* src/display.h (struct MetaDisplay): add a last_bell_time field,
	(XSERVER_TIME_IS_BEFORE_ASSUMING_REAL_TIMESTAMPS macro,
	XERVER_TIME_IS_BEFORE macro): add parentheses around usage of
	macro parameter

	* src/display.c (meta_display_open): initialize last_bell_time,
	(event_callback): don't allow more than one bell per second
2006-01-20 22:08:52 +00:00
Elijah Newren
32d4bd6b63 Patch from Kjartan Maraas to fix a lot of tiny issues (unused variable
2006-01-20  Elijah Newren  <newren gmail com>

	* src/async-getprop.c:
	* src/common.h:
	* src/display.c:
	* src/eggaccelerators.c:
	* src/frames.c:
	* src/gradient.c:
	* src/iconcache.c:
	* src/keybindings.c:
	* src/metaaccellabel.c:
	* src/place.c:
	* src/prefs.c:
	* src/preview-widget.c:
	* src/screen.c:
	* src/session.c:
	* src/stack.c:
	* src/tabpopup.c:
	* src/theme-viewer.c:
	* src/theme.c:
	* src/window-props.c:
	* src/window.c:
	* src/workspace.c:
	* src/tools/metacity-window-demo.c:
	* src/wm-tester/test-gravity.c:
	* src/wm-tester/test-resizing.c:
	* src/wm-tester/test-size-hints.c:
	Patch from Kjartan Maraas to fix a lot of tiny issues (unused
	variable removal, making unused variables used again, correction
	of types passed/declared for printf arguments, removal of unneeded
	breaks and returns, dead code removal, dead code revival, renaming
	to prevent shadowed variables, declaring unexported functions as
	static) spotted by the intel compiler.  #321439
2006-01-20 22:03:56 +00:00
Elijah Newren
9fdd3d165d Fix accidental overzealous focus holding by the terminal introduced by the
2006-01-15  Elijah Newren  <newren@gmail.com>

	Fix accidental overzealous focus holding by the terminal
	introduced by the original patch in bug 326159.  Windows launched
	from panel icons, the panel menu, or global keybindings should get
	focus now.  #326159.

	* src/display.c (meta_display_open, event_callback):
	* src/display.h (struct MetaDisplay):
	* src/keybindings.c (process_event):
	* src/window.c (meta_window_set_user_time):
	Add a new allow_terminal_deactivation field to MetaDisplay and use
	it to track whether the user's last action was interaction with
	the terminal or some outside action (global keybinding, clicking
	on a dock, etc.) likely to launch a new window.

	* src/window.c (window_state_on_map):
	Allow the focus switch from a terminal to something else if
	allow_terminal_deactiviation is true.

	* src/keybindings.c (handle_panel_keybinding):
	Remove some unneeded code.
2006-01-15 17:03:57 +00:00
Søren Sandmann
fea6191473 Add a dependency on libcm when building with compositor.
Fri Jan 13 14:40:19 2006  Søren Sandmann  <sandmann@redhat.com>

	* configure.in: Add a dependency on libcm when building with
	compositor.

	* src/window.c (meta_window_hide): Make this function static.

	* src/window.c (implement_showing): Use meta_compositor_minimize()
	to do a weird minimize effect.

	* src/compositor.[ch]: Beginning of new GL based compositor.

	* src/screen.h (struct _MetaScreen): Add void pointer to
	compositor data.

	* src/screen.c (meta_screen_new): Remove obsolete compositor
	stuff; initialize compositor_data. Don't composite manage screen
	out of this function.

	* src/errors.c (x_error_handler): Check that display is non-NULL
	before using it. Add comment about how that can happen.

	* src/display.c (meta_display_{begin,end}_grab_op): Remove
	explicity damage of windows.

	* src/display.c (meta_display_open): Composite manage all the
	screens.
2006-01-13 19:41:01 +00:00
Elijah Newren
5913b8c5ab Whoops, I forgot to keep my copyright info updated with my previous
2006-01-10  Elijah Newren  <newren@gmail.com>

	* src/bell.c:
	* src/boxes.c:
	* src/boxes.h:
	* src/constraints.c:
	* src/core.c:
	* src/display.c:
	* src/display.h:
	* src/edge-resistance.c:
	* src/frames.c:
	* src/keybindings.c:
	* src/main.c:
	* src/prefs.c:
	* src/prefs.h:
	* src/screen.c:
	* src/screen.h:
	* src/window.c:
	* src/window.h:
	Whoops, I forgot to keep my copyright info updated with my previous
	commits as Havoc had asked me to do.  Doing that now...
2006-01-10 19:43:21 +00:00
Elijah Newren
52df880f32 Add a raise on click option, basically only because all the major distros
2006-01-10  Elijah Newren  <newren@gmail.com>

	Add a raise on click option, basically only because all the major
	distros are patching it in anyway.  See #326156.

	* src/metacity.schemas.in: add the new gconf key and explanation

	* src/prefs.[ch] (#define KEY_RAISE_ON_CLICK, static gboolean
	  raise_on_click, update_raise_on_click, meta_prefs_init,
	  change_notify, meta_prefs_get_raise_on_click,
	  meta_preference_to_string):
	Add all the normal preference handling stuff for this new
	raise-on-click option.

	* src/core.c (meta_core_show_window_menu):
	* src/display.c (event_callback, meta_display_begin_grab_op):
	* src/window.c (window_activate, meta_window_configure_request, ):
	Only raise the window if in raise_on_click mode.

	* src/display.c (meta_display_begin_grab_op,
	  meta_display_end_grab_op, meta_display_check_threshold_reached):
	* src/display.h (struct MetaDisplay):
	* src/window.c (meta_window_handle_mouse_grab_op_event):
	if not in raise-on-click mode only raise on button release if the
	click didn't start a move or resize operation; needs a few extra
	MetaDisplay fields to handle this

	* src/core.c (meta_core_user_lower_and_unfocus):
	no need to do the MRU shuffling if not maintaining the stacking
	order == MRU order invariant

	* src/frames.c (meta_frames_button_press_event):
	* src/window.c (meta_window_begin_grab_op):
	remove an unneeded window raising that is already handled elsewhere
2006-01-10 19:35:03 +00:00
Elijah Newren
8c5b6c875a Fix window outline for minimized windows when using alt-esc. #325092.
2006-01-09  Elijah Newren  <newren@gmail.com>

	Fix window outline for minimized windows when using alt-esc.
	#325092.

	* src/display.c (meta_display_begin_grab_op): Specify the showing
	type of tabbing operation (Alt tab vs. alt-esc) in addition to the
	listing type of tabbing operation (docks vs normal windows) to
	meta_screen_ensure_tab_popup().

	* src/display.h (enum MetaTabShowType): new convenience enum

	* src/screen.[ch] (meta_screen_ensure_tab_popup): require the
	showing type be specified in addition to the tabbing type; put the
	outline around the window instead of the icon when in alt-esc
	mode.
2006-01-10 05:05:40 +00:00
Elijah Newren
ae52d731be Fix reduced resources resize handling for windows with sizing or resizing
2006-01-09  Elijah Newren  <newren@gmail.com>

	Fix reduced resources resize handling for windows with sizing or
	resizing constraints.  #325774.

	* src/display.c (meta_display_end_grab_op): Provide constraints.c
	with the correct gravity information.
2006-01-10 05:01:08 +00:00
Elijah Newren
703f58cdf7 Make the workspace switcher work with dual-head (non-xinerama) setups.
2005-12-27  Elijah Newren  <newren@gmail.com>

	Make the workspace switcher work with dual-head (non-xinerama)
	setups.  Fixes #319423.

	* src/display.c (meta_display_open, event_callback,
	  meta_display_focus_the_no_focus_window):
	* src/display.h (struct MetaDisplay,
	  meta_display_focus_the_no_focus_window):
	* src/keybindings.c (primary_modifier_still_pressed):
	* src/screen.c (meta_screen_new):
	* src/screen.h (struct MetaScreen):
	* src/window.c (meta_window_new_with_attrs, meta_window_show):
	* src/workspace.c (meta_workspace_focus_default_window):
	Replace display->no_focus_window with a no_focus_window for each
	screen.

	* src/display.[ch] (meta_display_xwindow_is_a_no_focus_window,
	  event_callback):
	* src/window.c (meta_window_new_with_attrs):
	New utility function, meta_display_xwindow_is_a_no_focus_window(),
	for checking if the given xwindow is a no_focus_window for one of
	the screens.
2005-12-28 06:24:30 +00:00
Elijah Newren
53cba6ed37 Oops, I only meant to commit the changes to rationales.txt in the last commit 2005-12-22 07:08:38 +00:00
Elijah Newren
7e821f37fd Add xinerama and multi-head tracker bugs 2005-12-22 06:18:38 +00:00
Elijah Newren
ca2fe384bc Don't allow removing a window from maximized or fullscreened state to
2005-11-22  Elijah Newren  <newren@gmail.com>

	Don't allow removing a window from maximized or fullscreened state
	to place the titlebar under the top panel.  Fixes #322075.

	* src/display.c (handle_net_moveresize_window): fix up previous
	comments now that I know a little more, modify the code just
	slightly to clarify that this is NOT a manual user move/resize
	operation

	* src/window.c (meta_window_unmaximize,
	  meta_window_unmake_fullscreen,
	  meta_window_shove_titlebar_onscreen):
	don't claim that these are manual user move/resize operations
2005-11-22 15:48:30 +00:00
Elijah Newren
a7201d27d1 Merge of all the changes on the constraints_experiments branch. This is
2005-11-18  Elijah Newren  <newren@gmail.com>

	Merge of all the changes on the constraints_experiments branch.
	This is just a summary, to get the full ChangeLog of those
	changes (approx. 2000 lines):
	  cvs -q -z3 update -Pd -r constraints_experiments
	  cvs -q -z3 diff -pu -r CONSTRAINTS_EXPERIMENTS_BRANCHPOINT ChangeLog

	Bugs fixed:
	  unfiled - constraints.c is overly complicated[1]
	  unfiled - constraints.c is not robust when all constraints
	            cannot simultaneously be met (constraints need to be
	            prioritized)
	  unfiled - keep-titlebar-onscreen constraint is decoration
	            unaware (since get_outermost_onscreen_positions()
	            forgets to include decorations)
	  unfiled - keyboard snap-moving and snap-resizing snap to hidden
	            edges
	   109553 - gravity w/ simultaneous move & resize doesn't work
	   113601 - maximize vertical and horizontal should toggle and be
	            constrained
	   122196 - windows show up under vertical panels
	   122670 - jerky/random resizing of window via keyboard[2]
	   124582 - keyboard and mouse snap-resizing and snap-moving
	            erroneously moves the window multidimensionally
	   136307 - don't allow apps to resize themselves off the screen
	            (*cough* filechooser *cough*)
	   142016, 143784 - windows should not span multiple xineramas
	            unless placed there by the user
	   143145 - clamp new windows to screensize and force them
	            onscreen, if they'll fit
	   144126 - Handle pathological strut lists sanely[3]
	   149867 - fixed aspect ratio windows are difficult to resize[4]
	   152898 - make screen edges consistent; allow easy slamming of
	            windows into the left, right, and bottom edges of the
	            screen too.
	   154706 - bouncing weirdness at screen edge with keyboard moving
	            or resizing
	   156699 - avoid struts when placing windows, if possible (nasty
	            a11y blocker)
	   302456 - dragging offscreen too restrictive
	   304857 - wireframe moving off the top of the screen is misleading
	   308521 - make uni-directional resizing easier with
	            alt-middle-drag and prevent the occasional super
	            annoying resize-the-wrong-side(s) behavior
	   312007 - snap-resize moves windows with a minimum size
	            constraint
	   312104 - resizing the top of a window can cause the bottom to
	            grow
	   319351 - don't instantly snap on mouse-move-snapping, remove
	            braindeadedness of having order of releasing shift and
	            releasing button press matter so much

	   [1] fixed in my opinion, anyway.
	   [2] Actually, it's not totally fixed--it's just annoying
	       instead of almost completely unusable.  Matthias had a
	       suggestion that may fix the remainder of the problems (see
	       http://tinyurl.com/bwzuu).
	   [3] This bug was originally about not-quite-so-pathological
	       cases but was left open for the worse cases. The code from
	       the branch handles the remainder of the cases mentioned in
	       this bug.
	   [4] Actually, although it's far better there's still some minor
	       issues left: a slight drift that's only noticeable after
	       lots of resizing, and potential problems with partially
	       onscreen constraints due to not clearing any
	       fixed_directions flags (aspect ratio windows get resized in
	       both directions and thus aren't fixed in one of them)

	New feature:
	    81704 - edge resistance for user move and resize operations;
	            in particular 3 different kinds of resistance are
	            implemented:
             	 Pixel-Distance: window movement is resisted when it
	     	   aligns with an edge unless the movement is greater than
	     	   a threshold number of pixels
             	 Timeout: window movement past an edge is prevented until
	     	   a certain amount of time has elapsed during the
	     	   operation since the first request to move it past that
	     	   edge
             	 Keyboard-Buildup: when moving or resizing with the
	     	   keyboard, once a window is aligned with a certain edge
	     	   it cannot move past until the correct direction has
	     	   been pressed enough times (e.g. 2 or 3 times)

	Major changes:
	  - constraints.c has been rewritten; very few lines of code from
	    the old version remain.  There is a comment near the top of
	    the function explaining the basics of how the new framework
	    works.  A more detailed explanation can be found in
	    doc/how-constraints-works.txt
	  - edge-resistance.[ch] are new files implementing edge-resistance.
	  - boxes.[ch] are new files containing low-level error-prone
	    functions used heavily in constraints.c and edge-resistance.c,
	    among various places throughout the code.  testboxes.c
	    contains a thorough testsuite for the boxes.[ch] functions
	    compiled into a program, testboxes.
	  - meta_window_move_resize_internal() *must* be told the gravity
	    of the associated operation (if it's just a move operation,
	    the gravity will be ignored, but for resize and move+resize
	    the correct value is needed)
	  - the craziness of different values that
	    meta_window_move_resize_internal() accepts has been documented
	    in a large comment at the beginning of the function.  It may
	    be possible to clean this up some, but until then things will
	    remain as they were before--caller beware.
	  - screen and xinerama usable areas (i.e. places not covered by
	    e.g. panels) are cached in the workspace now, as are the
	    screen and xinerama edges.  These get updated with the
	    workarea in src/workspace.c:ensure_work_areas_validated()
2005-11-19 14:58:50 +00:00
Elijah Newren
29e38a2f53 Add my copyright notice to a number of files on which it should already
2005-10-08  Elijah Newren  <newren@gmail.com>

	Add my copyright notice to a number of files on which it should
	already exist.
2005-10-08 19:38:54 +00:00
Elijah Newren
ef5299ee92 Truncate ridiculously long titles to avoid crashing or letting the pager
2005-10-03  Elijah Newren  <newren@gmail.com>

	Truncate ridiculously long titles to avoid crashing or letting the
	pager crash.  Based on patch from Ray, incorporating suggestions
	from Havoc and some extensions of my own.  Fixes #315070.

	* src/display.c (set_utf8_string_hint, meta_display_open):
	* src/xprops.[ch] (meta_prop_set_utf8_string_hint):
	Move set_utf8_string_hint() to props.[ch], namespace it
	("meta_prop_"), and make it public

	* src/tabpopup.c (utf8_strndup, meta_ui_tab_popup_new):
	* src/util.[ch] (meta_g_utf8_strndup):
	Move utf8_strndup() to util.[ch], namespace it ("meta_g_"), and
	make it public

	* src/display.c (meta_display_open):
	* src/display.h (struct _MetaDisplay):
	add net_wm_visible_name and net_wm_visible_icon_name atoms to the
	list of atoms we work with

	* src/window-props.c (set_window_title, set_icon_title): If title
	length is greater than 512, truncate it and set
	_NET_WM_VISIBLE_NAME or _NET_WM_VISIBLE_ICON_NAME accordingly
2005-10-03 18:13:45 +00:00