1
0
Fork 0
Commit graph

456 commits

Author SHA1 Message Date
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
Elijah Newren
e2ea1cf722 Patch from Dan Sanders to fix #334899.
2006-04-16  Elijah Newren  <newren gmail com>

	Patch from Dan Sanders to fix #334899.

	* window.c (meta_window_new_with_attrs): Unminimize ancestors of
	new windows when mapped; this prevents e.g. confirmation windows
	from causing applications to appear locked when closing via the
	window list.
2006-04-17 03:54:49 +00:00
Elijah Newren
7e2d5185a0 Patch from Dan Sanders to fix #335076.
2006-04-15  Elijah Newren  <newren gmail com>

	Patch from Dan Sanders to fix #335076.

	* src/core.c (meta_core_maximize, meta_core_toggle_maximize,
	  meta_core_unmaximize):
	* src/window.c (meta_window_client_message):
	Raise windows on maximize/unmaximize.
2006-04-16 02:20:41 +00:00
Elijah Newren
59d99fb9d1 Patch from Ron Yorston to add a focus_new_windows option. Default is
2006-04-12  Elijah Newren  <newren gmail com>

	Patch from Ron Yorston to add a focus_new_windows option.  Default
	is 'smart' (focus by default but normal focus-stealing-prevention
	can kick in); 'strict' is current other choice (like 'smart'
	except that programs launched by the terminal will not be
	focused).  Fixes remainder of #326159.  Should also close #152004
	and a bunch of others.

	* src/common.h:
	Add a MetaFocusNewWindows enum giving the current types allowed

	* src/display.h:
	Update docs on allow_terminal_deactivation to note that it is only
	relevant when focus_new_windows is 'strict'

	* src/prefs.c:
	* src/prefs.h:

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

	* src/prefs.[ch] (#define KEY_FOCUS_NEW_WINDOWS, static gboolean
	  focus_new_windows, update_focus_new_windows, meta_prefs_init,
	  change_notify, meta_prefs_get_focus_new_windows,
	  meta_preference_to_string):
	Add all the normal preference handling stuff for this new
	focus-new-windows option.

	* src/window.c (window_state_on_map, meta_window_set_user_time):
	Don't focus windows launched from a terminal
2006-04-12 18:01:20 +00:00
Søren Sandmann
4b683fdbf2 Check if the window is a menu and make it 90% opaque in that case.
Mon Apr 10 16:44:51 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (is_menu): Check if the window is a menu and make
	it 90% opaque in that case.

	* src/c-screen.c (claim_selection): Handle CM_Sn selection
	properly.

	* src/c-screen.c: Remove debug spew

	* src/screen.c (meta_screen_composite_all_windows): Remove debug spew
2006-04-10 20:47:02 +00:00
Elijah Newren
127a89886b Fix grouping in the presence of ancestors; caught by Björn. #336184
2006-03-29  Elijah Newren  <newren gmail com>

	Fix grouping in the presence of ancestors; caught by Björn.
	#336184

	* src/group.c (meta_window_compute_group): Use new
	meta_window_find_root_ancestor() function to get ancestor; for the
	computed group, use the ancestor's group instead of the ancestor
	itself

	* src/window.[ch] (meta_window_find_root_ancestor,
	meta_window_raise): split meta_window_find_root_ancestor()
	functionality of meta_window_raise() and make it available
	elsewhere
2006-03-30 19:22:38 +00:00
Thomas Thurman
cf3deef6ea mark a window as needing or not needing the user's attention use the new
2006-03-29  Thomas Thurman   <thomas@thurman.org.uk>
        * src/window.c, src/window.h (meta_window_set_demands_attention,
        meta_window_unset_demands_attention): mark a window as needing
        or not needing the user's attention
        * src/window.c (meta_window_show, window_activate,
        meta_window_focus, meta_window_configure_request,
        meta_window_client_message): use the new set/unset
        demands attention functions. Fixes #305822.
2006-03-29 18:43:22 +00:00
Björn Lindqvist
28aeacb247 *** empty log message *** 2006-03-29 16:05:23 +00:00
Thomas Thurman
25923105e4 deleted and moved into window-props.c (meta_window_new_with_attrs): added
2006-03-25  Thomas Thurman  <thomas@thurman.org.uk>

	* src/window.c, src/window.h (update_net_wm_state,
	update_mwm_hints, update_wm_class, update_transient_for):
	deleted and moved into window-props.c
	(meta_window_new_with_attrs): added constructing field
	and four new initial properties (as above)
	(meta_window_recalc_features,
	meta_window_recalc_window_type): new functions

	* src/window-props.c (init_net_wm_state, reload_net_wm_state
	init_mwm_hints, reload_mwm_hints, init_wm_class,
	reload_mwm_class, init_transient_for, reload_transient_for):
	new functions, moved in from window.c

	(meta_display_init_window_prop_hooks): initialise new properties
2006-03-25 22:57:22 +00:00
Thomas Thurman
ab176cf831 Always set _NET_WM_STATE when a window is shown or hidden, even if it
2006-03-03  Thomas Thurman  <thomas@thurman.org.uk>

	Always set _NET_WM_STATE when a window is shown or
	hidden, even if it wasn't mapped.

	* src/window.c (meta_window_hide, meta_window_show):
	call set_net_wm_state unconditionally
2006-03-17 03:26:25 +00:00
Søren Sandmann
ad2c7c6ce3 Use set_target_rect() instead of set_size().
Wed Mar 15 16:30:09 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c (set_geometry): Use set_target_rect() instead
	of set_size().

	* src/c-screen.c: Add set_target_rect() as a way of scaling windows.

	* src/window.c (meta_window_handle_mouse_grab_op_event): Turn
	updates on after a button release.

	* src/window.c (meta_window_move_resize_internal): Fix
	indentation.
2006-03-15 21:31:12 +00:00
Søren Sandmann
16de3b603b Comment out wobbling
Tue Mar 14 11:57:46 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c: Comment out wobbling

	* src/compositor.c (blow_up): remove this function

	* src/compositor.c (process_configure_notify): Uncomment
	set_size().

	* src/c-screen.c (meta_screen_info_set_updates): When updates are
	true, set all the properties such as size and shape.

	* src/c-screen.c (meta_screen_info_add_window): Create a special
	WindowInfo structure for each window.

	* src/c-screen.c (meta_screen_info_set_size): Set size and output
	shape of the drawable node.
2006-03-14 17:00:56 +00:00
Ryan Lortie
3c6b291641 Only unmaximise window before freeing if the window is actually maximised.
2006-03-06  Ryan Lortie  <desrt@desrt.ca>

        * src/window.c (meta_window_free): Only unmaximise window before
        freeing if the window is actually maximised.  #333563.
2006-03-06 16:33:33 +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
Elijah Newren
04a4f7c363 Patch from Thomas Thurman to work around buggy application grouping with
2006-02-27  Elijah Newren  <newren gmail com>

        Patch from Thomas Thurman to work around buggy application
        grouping with transient windows.  #328211

        * src/group.c (meta_window_compute_group):
        Put transients in the same group with their parent, always.

        * src/window.c (update_transient_for):
        Update group too
2006-02-27 22:19:11 +00:00
Søren Sandmann
f8f6016970 Remove include of flash.h
Sat Feb 25 14:50:17 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/window.c: Remove include of flash.h
2006-02-25 19:50:50 +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
ca539199b2 Add unused wobbly unminimize animation by Kristian
Wed Feb 15 14:47:50 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c (meta_compositor_unminimize): Add unused wobbly
	unminimize animation by Kristian

	* src/compositor.c (meta_compositor_minimize): Add wobbly minimize
	animation by Kristian.

	* src/compositor.c: Add support for turning updates on and off.

	* src/window.c (meta_window_move_resize_internal): Use
	sync counter to make composited resizing tear free
2006-02-15 19:50:12 +00:00
Elijah Newren
74510389bc remove this legacy cruft that we stopped using years ago
2006-02-11  Elijah Newren  <newren gmail com>

	* src/window.c (enum GnomeWinLayer): remove this legacy cruft that
	we stopped using years ago
2006-02-11 23:41:15 +00:00
Thomas Thurman
7aebefad3c Avoid a memory leak when checking which workspace(s) a window is on. Fixes
2006-02-10  Thomas Thurman <thomas thurman org uk>

	Avoid a memory leak when checking which workspace(s) a window is
	on.  Fixes #322059.

        * src/workspace.h (struct MetaWorkspace):
        * src/workspace.c (meta_workspace_new, meta_workspace_free):
	added list_containing_self member to MetaWorkspace

        * src/window.c (meta_window_get_workspaces): use
	window->workspace->list_containing_self instead of allocating (and
	leaking) such a list on the fly.
2006-02-11 05:06:08 +00:00
Elijah Newren
dcec11274a Avoid flashing when closing a maximized window. Fixes #317254.
2006-01-20  Elijah Newren  <newren gmail com>

	Avoid flashing when closing a maximized window.  Fixes #317254.

	* src/window.c (unmaximize_window_before_freeing): new function
	that just fixes the net_wm_state and sends a configure_notify,
	(meta_window_free): use unmaximize_window_before_freeing() instead
	of meta_window_unmaximize() to avoid flicker
2006-01-20 23:36:23 +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
Elijah Newren
ef792fc1f7 Patch from Jens Granseuer to fix more build issues with gcc 2.95. #327050.
2006-01-15  Elijah Newren  <newren@gmail.com>

	Patch from Jens Granseuer to fix more build issues with gcc 2.95.
	#327050.

	* src/boxes.c (meta_rectangle_edge_cmp_ignore_type):
	* src/window.c (meta_window_show):
	Remove C99 style variable initiailization
2006-01-15 16:37:06 +00:00
Elijah Newren
50bcc976bc Don't dereference a NULL string. Fixes #327013.
2006-01-14  Elijah Newren  <newren gmail com>

	* src/window.c (__window_is_terminal): Don't dereference a NULL
	string.  Fixes #327013.
2006-01-15 04:45:34 +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
f6270596de Don't "steal" focus from terminal windows for new window mappings as the
2006-01-10  Elijah Newren  <newren@gmail.com>

	Don't "steal" focus from terminal windows for new window mappings
	as the difference in usage between terminals and other apps seems
	to suggest this difference in treatment.  See #326159 for details,
	feedback welcome.

	* src/window.[ch] (__window_is_terminal): New function, currently
	an ugly hack and should be replaced by a new property set by
	applications if the behavior works to our liking,
	(window_state_on_map): don't transfer focus to new windows from
	terminals unless the new window is a transient of the focused
	terminal

	* src/keybindigns.c (handle_panel_keybinding): panel run dialog
	keybinding should be counted as an explicit transfer of focus to
	the new window, so override the
	don't-transfer-focus-from-terminals in this case
2006-01-10 18:33:53 +00:00