1
0
Fork 0
Commit graph

484 commits

Author SHA1 Message Date
Peter Bloomfield
d0523744b7 do not save client root coords while window is maximized
svn path=/trunk/; revision=3374
2007-11-06 13:23:39 +00:00
Thomas Thurman
4ef11cfbd3 new function. rewrite assertion not to put window on top in terms of
2007-10-16  Thomas Thurman  <thomas@thurman.org.uk>

        * src/window.c (window_would_be_covered): new function.
        * src/window.c (meta_window_show): rewrite assertion not
        to put window on top in terms of window_would_be_covered();
        remove assertion because it's no longer valid; explicitly
        don't focus windows that shouldn't be focussed; closes #486445.


svn path=/trunk/; revision=3358
2007-10-16 22:29:59 +00:00
Søren Sandmann
b1ff50f45f Don't maintain a passive grab on windows when raise-on-click is FALSE -
Tue Aug  7 13:26:49 2007  Søren Sandmann  <sandmann@redhat.com>

	* src/window.c (meta_window_notify_focus): Don't maintain a
	passive grab on windows when raise-on-click is FALSE - bug
	461577.



svn path=/trunk/; revision=3293
2007-08-07 17:27:09 +00:00
Thomas Thurman
cd07c25706 windows which are always on top have the "stick" menu option insensitive.
2007-06-31  Thomas Thurman  <thomas@thurman.org.uk>

        * src/window.c (meta_window_show_menu): windows which are
        always on top have the "stick" menu option insensitive. (#460997).


svn path=/trunk/; revision=3282
2007-07-31 12:20:14 +00:00
Cosimo Cecchi
e8b016984b Unset fullscreen is an allowed action where relevant. Fixes #449427.
2007-07-22  Cosimo Cecchi  <anarki@lilik.it>

Unset fullscreen is an allowed action where relevant. Fixes #449427.

* src/window.c (set_allowed_actions_hint): Separate FULLSCREEN action from RESIZE action.
                                                                                      

svn path=/trunk/; revision=3272
2007-07-23 00:46:03 +00:00
Damien Carbery
36287b9417 make prototype of meta_window_unqueue match implementation. Closes
2007-06-16  Damien Carbery  <damien.carbery@sun.com>

        * window.h: make prototype of meta_window_unqueue match
        implementation. Closes #446535.



svn path=/trunk/; revision=3243
2007-06-17 02:15:07 +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
Yair Hershkovitz
5194df842c Add support for RTL languages so that alt-tab, etc., go the other way. In
2007-05-25  Yair Hershkovitz  <yairhr@yahoo.com>

        * src/workspace.c (meta_workspace_get_neighbor): Add support
        for RTL languages so that alt-tab, etc., go the other way.
        * src/keybindings.c (handle_activate_menu): In RTL locales,
        pop up the menu on the right-hand side when the menu keystroke
        is pressed.
        * src/fixedtip.c (meta_fixed_tip_show): right-justify tooltips
        in RTL locales.
        * src/menu.c (popup_position_func): popup menus in RTL locales
        are flush with the right-hand side of the window where possible.
        * src/frames.c (show_tip_now, meta_frames_button_press_event):
        tooltips are aligned with the right-hand side of buttons in
        RTL locales.
        * src/ui.[ch] (meta_ui_get_direction, enum MetaUIDirection):
        New content.
        * src/window.c (meta_window_show_menu): "move left" appears above
        "move right" in the window menu for LTR locales, and vice versa
        for RTL locales.

        This is all to close bug #387893.


svn path=/trunk/; revision=3222
2007-05-25 14:36:12 +00:00
Elijah Newren
e66919510f Fix some fallout from #426519; update user_rect for all position changes
2007-04-17  Elijah Newren  <newren gmail com>

	Fix some fallout from #426519; update user_rect for all position
	changes prior to the window being marked as placed.  Prevents
	emacs in particular from flickering on start and always being
	shoved to the upper-left corner.

	* src/window.c (meta_window_move_resize_internal):
	Record position in user_rect if the window is not yet marked as
	placed too

	* src/window.c (struct MetaWindow, meta_window_new_with_attrs,
	  meta_window_move_resize_internal):
	Remove window->user_has_move_resized; it's not needed or used
	anymore.

	* src/window.[ch] (meta_window_get_user_position):
	Remove this function as it is no longer needed or used.

svn path=/trunk/; revision=3203
2007-04-18 05:43:42 +00:00
Elijah Newren
966e36b9f6 Prevent metacity from "forgetting" which machine a window is on. #418552
2007-04-16  Elijah Newren  <newren gmail com>

	Prevent metacity from "forgetting" which machine a window is on.
	#418552

	* src/window.c (meta_window_new_with_attrs): reorder the property
	loading so that we know the wm_client_machine when we load the
	name of the window and can modify the window name accordingly.

svn path=/trunk/; revision=3201
2007-04-16 16:23:12 +00:00
Elijah Newren
6de7271ab6 Remove incorrect usage of window.h from menu.c. See #426791 & #382962.
2007-04-15  Elijah Newren  <newren gmail com>

	Remove incorrect usage of window.h from menu.c.  See #426791 &
	#382962.

	* src/menu.c (enum MetaMenuItemType, variable menuitems,
	  meta_menu_item_new):
	cleanup: add a MENU_ITEM_RADIOBUTTON for the sticky stuff

	* src/menu.c (variable menuitems):
	* src/core.c (meta_core_get_menu_accelerator):
	* src/window.c (menu_callback, meta_window_show_menu):
	* src/common.h (enum MetaMenuOp):
	reinstate META_MENU_OP_UNABOVE

	* src/menu.c (meta_window_menu_new):
	remove hacks (using inappropriate data) for STICK/UNSTICK/ABOVE
	and clean it up while just setting STICK/UNSTICK activeness as
	necessary

	* src/menu.[ch] (meta_window_menu_new):
	* src/ui.[ch] (meta_ui_window_menu_new):
	make the active_workspace parameter an unsigned long

2007-04-15  Bruno Boaventura <brunobol@gnome.org>

	* src/menu.c (meta_window_menu_new): don't show the current
	workspace as a possible workspace to switch to.  Fixes #426791.

svn path=/trunk/; revision=3196
2007-04-16 04:48:14 +00:00
Elijah Newren
9ec6dbd5ca Make sure apps have correct info about their coordinates, even on unmap.
2007-04-11  Elijah Newren  <newren gmail com>

	Make sure apps have correct info about their coordinates, even on
	unmap.  Fixes temporary hang with libXt (XtVaSetValues setting x &
	y coordinates).  #399552.

	* src/frame.c (meta_window_destroy_frame): Add a comment noting
	that the current choice causes the need for a ConfigureNotify
	event

	* src/window.c (meta_window_free): Send a configure notify event
	due to our XReparentWindow coordinate choices on withdrawal,
	(unmaximize_window_before_freeing): no need to send a configure
	notify from here since it is always done in meta_window_free new,
	(send_configure_notify): have to special case the coordinates used
	when withdrawing the window

svn path=/trunk/; revision=3192
2007-04-12 04:02:57 +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
eb639a4650 make sure to set _NET_WM_ALLOWED_ACTIONS so that libwnck menus don't have
2007-04-10  Elijah Newren  <newren gmail com>

	* src/window.c (recalc_window_features): make sure to set
	_NET_WM_ALLOWED_ACTIONS so that libwnck menus don't have sensitive
	but ineffective menu items.  The "On Top" item is now buggy, but
	due to the fact that _NET_WM_ACTION_ABOVE is not yet defined in
	the EWMH.  Fixes #115247.

svn path=/trunk/; revision=3189
2007-04-11 02:37:30 +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
745906b7db Fix memory bug (invalid free) introduced in 2007-04-02 strut cleanup
2007-04-07  Elijah Newren  <newren gmail com>

	* src/window.c (meta_window_free): Fix memory bug (invalid free)
	introduced in 2007-04-02 strut cleanup commit.  Part of #427385.

svn path=/trunk/; revision=3173
2007-04-07 21:42:05 +00:00
Elijah Newren
dda3c2bee6 send synthetic configurenotify events also in response to MapRequest
2007-04-04  Elijah Newren  <newren gmail com>

	* src/window.c (meta_window_move_resize_internal): send synthetic
	configurenotify events also in response to MapRequest events when
	the window has a frame and the application specifies PPosition or
	UPosition hints.  I believe they are already sent for all other
	cases.  Should fix #322840.  Fixes the testcase at least.  :)

svn path=/trunk/; revision=3156
2007-04-04 23:52:21 +00:00
Elijah Newren
921661e91d Fix lots of little issues with min/max constraints and size increment
2004-04-04  Elijah Newren  <newren gmail com>

	Fix lots of little issues with min/max constraints and size
	increment constraints.  Fixes #329152, #418395, and possibly
	others.

	* src/window-props.c (meta_set_normal_hints):
	Do more checking to make sure application specified constraints
	are self-consistent, modifying the size_hints as necessary to
	achieve self-consistency.

	* src/constraints.c (setup_constraint_info): remove ugly
	copy-pasto, (constrain_size_increments): be careful that fixing
	violation of the constraints doesn't cause a violation of the
	minimum size constraints.

	* src/window.c (ensure_size_hints_satisfied): new function,
	(meta_window_unmaximize, meta_window_unmake_fullscreen): the
	saved_rect may no longer be valid (as in the case of #329152) so
	call ensure_size_hints_satisfied to fix it up.

	* doc/how-to-get-focus-right.txt: Some minor spacing and wording
	fixes completely unrelated to the rest of this commit

svn path=/trunk/; revision=3155
2007-04-04 21:54:56 +00:00
Elijah Newren
7a799b3a63 Only use saved_rect for determining the position to unmaximize to for the
2007-04-03  Elijah Newren  <newren gmail com>

	* src/window.c (meta_window_unmaximize):
	Only use saved_rect for determining the position to unmaximize to
	for the previously-maximized direction(s).  Fixes #355497.

svn path=/trunk/; revision=3154
2007-04-04 03:07:26 +00:00
Elijah Newren
08f51fdf94 Patch from Carlo Wood to fix handling of unidirectional maximization and
2007-04-02  Elijah Newren  <newren gmail com>

	Patch from Carlo Wood to fix handling of unidirectional
	maximization and partial struts.  #358311.

	* src/constraints.c (constrain_maximization):
	determine target size for unidirectionally maximized windows by
	determining how far they can be maximized without hitting
	orthogonal struts.  Avoids weird "empty spaces".

	* src/boxes.[ch] (meta_rectangle_expand_to_avoiding_struts):
	new function

2007-04-02  Elijah Newren  <newren gmail com>

	Make the strut lists (stored in workspaces) record both the
	rectangle and the side that the strut is on.  Lots of code
	cleanups relating to struts.

	* src/boxes.h (struct MetaStrut):
	new struct for struts

	* src/window.[ch] (struct MetaStruts, struct MetaWindow,
	  meta_window_update_struts):
	overhaul to make window's struts remember their side as well as
	their rectangular location, and just use a list instead of several
	copies of near-identical code for left/right/top/bottom (allowing
	us to nuke MetaStruts struct as well)
	
	* src/testboxes.c (new_meta_strut, get_strut_list):
	* src/workspace.c (ensure_work_areas_validated):
	* src/boxes.c (meta_rectangle_get_minimal_spanning_set_for_region,
	  meta_rectangle_expand_to_avoiding_struts,
	  get_disjoint_strut_rect_list_in_region, fix_up_edges,
	  meta_rectangle_find_onscreen_edges,
	  meta_rectangle_find_nonintersected_xinerama_edges):
	modify to handle struts being rectangle + side instead of just rectangle

	* src/workspace.c (ensure_work_areas_validated):
	simplify strut list creation considerably given MetaWindow change,
	modify work_area computations to take advantage of region
	computations being done (makes the code shorter as well as more
	robust against pathological cases).

	* src/util.[ch] (meta_free_gslist_and_elements):
	new convenience function

	* src/common.h (enum MetaDirection):
	* src/edge-resistance.c (movement_towards_edge):
	* src/boxes.c (meta_rectangle_edge_aligns,
	  rectangle_and_edge_intersection, split_edge):
	Add more MetaDirection fields for convenience

	* src/boxes.h (enum FixedDirections):
	* src/constraints.c (setup_constraint_info, place_window_if_needed):
	add a FIXED_DIRECTION_NONE to the FixedDirections enum to make
	code more clear

svn path=/trunk/; revision=3144
2007-04-03 03:41:10 +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
Bruno Boaventura
5ca9f43752 Move "On Top" option in menu. Fix #382962.
2006-12-27  Bruno Boaventura  <brunoboaventura@gmail.com>

        Move "On Top" option in menu. Fix #382962.

        * src/common.h, src/core.c: Remove META_MENU_OP_UNABOVE.
        * src/menu.c: remove unabove menu item and put above item
        next "Always on Visible Viewport".
        * src/window.c: remove handles of META_MENU_OP_UNABOVE.
2006-12-27 15:51:49 +00:00
Christof Krüger
ceb54162b3 Fix flickering about when dragging maximised windows between xineramas.
2006-12-05  Christof Krüger  <mail@pop2wap.net>

        * src/window.c (update_move): Fix flickering about when dragging
        maximised windows between xineramas. Closes #358715.
2006-12-06 01:26:30 +00:00
Federico Mena Quintero
caf43a123f Fix http://bugzilla.gnome.org/show_bug.cgi?id=381127:
2006-12-03  Federico Mena Quintero  <federico@novell.com>

	Fix http://bugzilla.gnome.org/show_bug.cgi?id=381127:

	* src/window.c (idle_calc_showing): Grab the server while the
	windows are being shuffled.  First show the windows to be shown,
	and then hide the windows to be hidden, in order to minimize
	the number of expose events.
2006-12-03 20:05:23 +00:00
Bruno Boaventura
a3e309bab8 2006-11-15 Björn Lindqvist <bjourne@gmail.com>
2006-11-15  Bruno Boaventura  <brunoboaventura@gmail.com>
2006-11-15  Björn Lindqvist   <bjourne@gmail.com>

        * src/menu.c: added MetaMenuItemType enum; added it
        to MenuItem; added values of this type to menuitems
        array.
        * src/menu.c (menu_item_new): rewrite to take a MenuItem
        instead of a set of parameters describing the menu item.
        * src/menu.c (meta_window_menu_new): use proper checkboxes
        or radio buttons on the window menu.
        * src/window.c (meta_window_show_menu): unstick and stick
        are always shown.
2006-11-15 13:16:32 +00:00
Dan Mick
191baa3c76 Fix strict focus mode by picking up on res_class. Fixes #361054, strict
2006-10-30  Dan Mick  <dan.mick@sun.com>

	* src/window.c: (__window_is_terminal): Fix strict focus
        mode by picking up on res_class. Fixes #361054, strict focus
        mode still not working; should look for res_class, not res_name
2006-10-29 20:30:18 +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
Thomas James Alexander Thurman
90359a5346 Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
	that we know when to mark it as always on top.  Added six grab ops,
	one to do and one to undo each of the three new titlebar buttons
	(shade, above, stick).  Added six new button functions, similarly.
	(#96229)

        * frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
         attribute, set META_FRAME_ABOVE in its flags.

        * frames.c (meta_frames_apply_shapes): Allow variable amounts of
         rounding. (#113162)

        * frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
	 get_control): extend handling of existing buttons to the
         3*2 new kinds of button. (#96229)

        * frames.c (meta_frames_button_press_event): translate clicks on the 3*2
         new kinds of button to the new grab ops. (#96229)

        * frames.c (meta_frames_button_release_event): implement the various
        actions for the 3*2 new kinds of button. (#96229)

        * frames.c (meta_frames_update_prelit_control,
         meta_frames_motion_notify_event): extend existing motion
         notifications for buttons to the 3*2 new kinds of button. (#96229)

        * frames.c (meta_frames_set_window_background): handle specified
         background colours and alpha transparency. (#151261)

        * frames.h (MetaFrameControl): New control types for the 3*2 new kinds
	 of button.  (#96229)

        * iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
	 window has no icon; use metacity's fallback icons only if the theme
         does not provide any. (#11363)

        * iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
         icon cache on windows using default icons, and update them. (#11363)

        * main.c (main): added \n to error message.

        * prefs.c (button_function_from_string): extend for 3 new button
	 types. (#96229)

        * prefs.c (button_opposite_function (new function)): return a button
         function's inverse (shade -> unshade, etc) (#96229)

        * prefs.c (update_button_layout): allocate space for a button's
	 inverse, if it has one. (#96229)

        * theme-parser.c (ParseState): add state for fallback icons (#11363)

        * theme-parser.c (ParseInfo): add format_version; remove
         menu_icon_* (#114305)

        * theme-parser.c (parse_positive_integer): add lookup for integer
	 constants (#331356)

        * theme-parser.c (parse_rounding (new function)): parse window
	 rounding amount (#113162)

        * theme-parser.c (parse_alpha): don't set error if the number can't
	 be parsed since it'll already be set; change tolerance in comparison
	 from 1e6 to 1e-6

        * theme-parser.c (parse_color (new function)): parse colour, including
	 possible constant lookup.

        * theme-parser.c (parse_toplevel_element): allow defining of various
	new kinds of constant; allow
	hide_buttons (#121639) and more detailed rounding attributes on
	<frame_geometry> (#113162); allow background and alpha attributes on
	<frame_style>; (#151261) remove support for <menu_icon> except as
	stub; (#114305) add support for loading stock images (#113465); add
        support for <fallback>. (#11363))

        * theme-parser.c (parse_draw_op_element): add from and to attribute
         for arcs. (#121603)

        * theme-parser.c (parse_style_element): add check for theme version
         supporting a button function. (#96229)

        * theme-parser.c (parse_style_set_element): add ability for shaded
	 windows to be resizable (#114304)

        * theme-parser.c (meta_theme_load): add theme versioning routine.

        * theme.c ( meta_frame_layout_get_borders): return rectangles for
	 the new 3*2 kinds of button, except where they're
         inapplicable. (#96229)

        * theme.c (meta_frame_layout_calc_geometry): don't format buttons on
	windows with no buttons (#121639); strip the 3*2 new kinds of button
	correctly (#96229); allow variable amounts of rounding (#113162).

        * theme.c (meta_frame_style_new): set alpha to 255 by
        default. (#151261)

        * theme.c (meta_frame_style_unref): free colour spec if
        allocated. (#151261)

        * theme.c (meta_frame_style_validate): it's only an error not to
        include a button if that button is valid in the current
        theme. (#96229)

        * theme.c (button_rect): return rectangles for the new 3*2 kinds
	of button. (#96229)

        * theme.c (meta_frame_style_set_unref): free differently resizable
	shaded styles. (#114304)

        * theme.c (get_style): look up differently resizable styles
        for shaded windows. (#114304)

        * theme.c (free_menu_ops (removed function), get_menu_icon
	 (removed function), meta_theme_draw_menu_icon (removed function),
         meta_menu_icon_type_from_string (removed function),
         meta_menu_icon_type_to_string (removed function),
         meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)

        * theme.c (meta_theme_load_image): add size_of_theme_icons
	parameter. (#113465)

        * theme.c (meta_theme_define_color_constant (new function),
        meta_theme_lookup_color_constant (new function)): allow
        definition of colour constants. (#129747)

        * theme.c (meta_button_type_from_string, meta_button_type_to_string):
        add the 3*2 new kinds of button. (#96229)

        * theme.c (meta_theme_earliest_version_with_button (new function)):
        return the theme version each button was introduced in. (#96229)

        * theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
	corner radiuses. (#113162)

        * theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
	buttons. (#96229)

        * theme.h (MetaButtonType): the 3*2 new buttons. (#96229)

        * theme.h (MetaFrameStyle): add window_background_color and
        window_background_alpha so that we can specify background on a
        <frame_style>. (#151261)

        * theme.h (MetaFrameStyleSet): shaded_styles gets resize
	dimension. (#114304)

        * theme.h (MetaTheme): added format_version, color_constants
        hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
        and removed menu_icons. (#114305)

        * theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
        supports a given feature. Also, several macros representing
        new features in v2.

        * ui.c (meta_ui_set_current_theme)): also invalidate default
        icons. (#11363)

        * window.[ch] (meta_window_update_icon_now)): became
	non-static. (#11363)
2006-10-07 16:56:47 +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
569ff8a34c Patch from Jens Granseuer to fix c89 cleanness, again. #356631.
2006-09-18  Elijah Newren  <newren gmail com>

	* src/window.c (meta_window_show): Patch from Jens Granseuer to
	fix c89 cleanness, again.  #356631.
2006-09-18 22:00:57 +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
8144a962e7 Patch from Thomas Andersen to make windows be stacked correctly before
2006-09-13  Elijah Newren  <newren gmail com>

	* src/window.c (meta_window_show): Patch from Thomas Andersen to
	make windows be stacked correctly before showing them, to prevent
	flicker with focus stealing prevention.  #332385.
2006-09-13 22:21:19 +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
4c96afba71 Fix several bugs with handling of fullscreen windows, causing them to not
2006-08-21  Elijah Newren  <newren gmail com>

	Fix several bugs with handling of fullscreen windows, causing them
	to not actually be fullscreen.  #343115 (and also #346927,
	#350547, #351643, the recent additional WINE-related issue
	mentioned on the mailing list, and probably others...)

	* src/constraints.c (setup_constraint_info): if a window tries to
	resize to fullscreen-size and it has a fullscreen function but
	isn't actually marked as fullscreen then assist it by marking it
	as such, (constrain_fully_onscreen, constrain_titlebar_visible):
	ignore this constraint for fullscreen windows since such windows
	have a separate specialized constraint

	* src/stack.c (window_is_fullscreen_size, get_standalone_layer):
	remove the old window_is_fullscreen_size() hack for detecting
	windows to treat as fullscreen since it doesn't work well with the
	new constraints framework (i.e. we needed a slightly different
	hack)

	* src/window.[ch] (meta_window_new_with_addrs): shuffle the order
	of adding the window to the stack and moveresizing the window
	since moveresizing can cause stack changes if the window's initial
	size is fullscreen size, (meta_window_make_fullscreen,
	meta_window_make_fullscreen_internal): split
	meta_window_make_fullscreen() similar to meta_window_maximize() so
	that constraints can make use of it
2006-08-21 18:08:05 +00:00
Elijah Newren
9051b70d40 Vytautus Liuolia totally rocks; he tested and debugged and tracked down
2006-08-07  Elijah Newren  <newren gmail com>

	* src/window.c (intervening_user_event_occurred): Vytautus Liuolia
	totally rocks; he tested and debugged and tracked down where we
	were using the focus window's net_wm_user_time even when it was
	uninitialized.  This may fix bug 311868 and others I've heard
	about (with Valknut, IIRC).  It definitely fixes the issues Vytas
	was seeing with his single instance library.  :-)
2006-08-09 18:32:30 +00:00
Elijah Newren
57bedc42a4 Add a constrain_titlebar_visible constraint; should fix both bug 333328
2006-08-07  Elijah Newren  <newren gmail com>

	Add a constrain_titlebar_visible constraint; should fix both bug
	333328 and bug 345522.  Not perfect (minor annoying snap pulling
	windows back onscreen, plus an ugly hack almost as bad as the old
	one), but tarballs are due in less than half an hour.  ;-)

	* src/boxes.[ch] (meta_rectangle_overlaps_with_region):
	new function

	* src/constraints.c (constrain_titlebar_visible): new function,
	  (enum ConstraintPriority, array all_constraints,
	  update_onscreen_requirements): various small changes to
	  accomodate the new function

	* src/edge-resistance.c: remove the infinite edge resistance,
	which was a big hack of a way to workaround the lack of a
	titlebar_visible constraint

	* src/window.[ch] (MetaWindow): new require_titlebar_visible
	bitfield, (meta_window_new_with_attrs): initialized here
2006-08-07 23:34:55 +00:00
Elijah Newren
adc46fc970 Patch from Vytautas Liuolia to react to _NET_STARTUP_ID changes, as
2006-08-07  Elijah Newren  <newren gmail com>

	Patch from Vytautas Liuolia to react to _NET_STARTUP_ID changes,
	as proposed for the new startup-notification/EWMH spec.  #347515

	* src/window-props.c (reload_net_startup_id): be sure to act on
	the new id instead of just recording it

	* src/window.[ch] (window_activate, meta_window_activate,
	  meta_window_activate_with_workspace, meta_window_client_message):
	change window_activate() to take a workspace parameter instead of
	hardcoding to the current workspace, add
	meta_window_activate_with_workspace() function needed by
	reload_net_startup_id().
2006-08-07 18:08:27 +00:00
Elijah Newren
74d4768b8e Patch from Dmitry Timoshkov to fix the heuristic for determining if
2006-08-04  Elijah Newren  <newren gmail com>

	Patch from Dmitry Timoshkov to fix the heuristic for determining
	if windows can be made fullscreen (needed for WINE and possible
	also some legacy applications).  Part of #346927.

	* src/window.c (recalc_window_features): ignore window decoration
	when checking size for determing whether an unresizable window
	should be allowed ot be considered for fullscreening
2006-08-04 22:33:20 +00:00
Thomas James Alexander Thurman
e8fb842aad oops, forgot to add missing apostrophe. Punctuation is good. #336850. 2006-07-31 19:58:06 +00:00
Thomas James Alexander Thurman
76e4fd8a07 Make it so maximized windows do not have rounded corners. #336850. 2006-07-31 19:56:56 +00:00
Søren Sandmann
4a06163710 Run an unminimize effect
Fri May 26 16:48:29 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/effects.c (meta_effect_run_unminimize): Run an unminimize effect

        * src/window.c (meta_window_unminimize): Store a "was_minimized"
        boolean in the window.

        * src/window.c (meta_window_show): If the window was minimized,
        run an unminimize animation.

        * src/c-window.c (meta_comp_window_run_unminimize): Add an
        unminimize animation, running the minimize one in reverse.
2006-05-26 20:50:34 +00:00
Adam Jackson
76dff49a3e Bounce on window focus. 2006-05-25 14:40:50 +00:00
Adam Jackson
22bc36eb3b Move shrink effect code from compositor.c to c-window.c. Stubs for
restore effect.  Notes in various places for where to hook in
other effects.
2006-05-23 21:42:34 +00:00
Søren Sandmann
3e5b9776c6 Beginning of new layer that abstracts transition effects.
Mon May 22 17:35:52 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/effects.[ch]: Beginning of new layer that abstracts
	transition effects.

	New functions:
	(meta_push_effect_handler): Install an effect handler
	(meta_pop_effect_handler): Remove last effect handler
	(meta_effect_run_minimize): Create a minimize effect and pass it
	to the handler.
	(meta_effect_end): Called by handler when the effect is finished.

	* src/compositor.c: Move explosion code form there to src/c-window.c.

	* src/c-screen.c: Delete explosion related code.
2006-05-22 21:46:14 +00:00
Björn Lindqvist
23a5f5bb58 Remove the unused attributes resize_gravity, width_inc, height_inc,
2006-05-18  Björn Lindqvist  <bjourne@gmail.com>

	* resizepopup.c: Remove the unused attributes resize_gravity,
	width_inc, height_inc, min_width, min_height, frame_left,
	frame_right, frame_top, frame_bottom, tick_origin_x, tick_origin_y
	from the MetaResizePopup struct. Delete all code that references
	those attributes.
2006-05-18 08:32:16 +00:00
Elijah Newren
b62dd8d130 Clear _NET_WM_VISIBLE_NAME (and the ICON_ equivalent) when no longer being
2006-04-25  Elijah Newren  <newren gmail com>

	Clear _NET_WM_VISIBLE_NAME (and the ICON_ equivalent) when no
	longer being used.  Fixes #330671.

	* src/window.[ch] (struct MetaWindow): new
	using_net_wm_visible_name and using_net_wm_visible_icon_name bits,
	(meta_window_new_with_attrs): initialize these new bits to false

	* src/window-props.c (set_title_text, set_window_title, set_icon_title):
	if the _NET_WM_VISIBLE_(ICON_)NAME property was previously set but
	doesn't need to be this time, make sure to clear it
2006-05-05 01:10:20 +00:00