Commit Graph

528 Commits

Author SHA1 Message Date
Havoc Pennington
77349f6878 fix bug I introduced in case where scaling was done in both directions.
2002-11-04  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (scale_and_alpha_pixbuf): fix bug I introduced in
	case where scaling was done in both directions.
2002-11-04 20:34:25 +00:00
Havoc Pennington
5efd276a22 Patch from Brian Cameron to implement the vertical/horizontal striped
2002-11-04  Havoc Pennington  <hp@pobox.com>

        Patch from Brian Cameron to implement the vertical/horizontal
	striped image accelerated scaling from the gtk pixbuf engine.

	* src/theme.c (scale_and_alpha_pixbuf): if an image is
	vertical/horizontal stripes, use special extra-fast scaling
	routines.

	* src/theme-parser.c (parse_draw_op_element): when loading an
	image, mark it as vertically/horizontally striped when appropriate
2002-11-04 17:55:56 +00:00
Erwann Chenede -
373f6de13e changed __FUNCTION__ to G_GNUC_FUNCTION as __FUNCTION__ is not portable.
2002-11-04 Erwann Chenede - <erwann.chenede@sun.com>

  * src/xprops.c (meta_prop_get_values): changed __FUNCTION__
  to G_GNUC_FUNCTION as __FUNCTION__ is not portable.
2002-11-04 17:24:47 +00:00
Havoc Pennington
e0a4c2a1df remove XSync calls from here (meta_display_ungrab): remove XSync from
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_grab): remove XSync calls from here
	(meta_display_ungrab): remove XSync from here, but put in
	an XFlush to be sure we get the ungrab sent.

	* src/util.c (meta_topic): track sync count here

	* src/errors.c: move sync count out of here

        Throughout: error spew on all XSync() calls

	* src/run-metacity.sh: don't set METACITY_DEBUG
2002-11-04 00:56:12 +00:00
Havoc Pennington
9feebc05c7 add _NET_WM_NAME, WM_NAME, _NET_WM_ICON_NAME, WM_ICON_NAME support
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/window-props.c (meta_display_init_window_prop_hooks): add
	_NET_WM_NAME, WM_NAME, _NET_WM_ICON_NAME, WM_ICON_NAME support

	* src/window.c (meta_window_new): use window-props.h for
	_NET_WM_NAME, WM_NAME, _NET_WM_ICON_NAME, WM_ICON_NAME
2002-11-04 00:19:08 +00:00
Havoc Pennington
d7917c02fe use window-props.h stuff for a couple of properties (implement_showing):
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_new): use window-props.h stuff for a
	couple of properties
	(implement_showing): fix printf string

	* src/xprops.c (meta_prop_free_values): new function

	* src/window-props.h, src/window-props.c: start moving code that
	handles loading window properties into this file.
2002-11-03 23:42:21 +00:00
Havoc Pennington
1d0b5ef660 split into "see if we should be showing" and "actually show/hide"
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_calc_showing): split into "see if we
	should be showing" and "actually show/hide" functions
	(idle_calc_showing): rework to first unmap all newly-hidden
	windows from bottom to top then map all newly-showing windows from
	top to bottom resulting in fewer exposes, #95220
2002-11-03 20:30:45 +00:00
Havoc Pennington
ee84fbb81f fix from Garrett LeSage for which button backgrounds we draw when
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (meta_frame_layout_calc_geometry): fix from Garrett
	LeSage for which button backgrounds we draw when
2002-11-03 19:55:38 +00:00
Havoc Pennington
6a1abc7482 new function, and remove workspace->name field, instead just get the name
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/workspace.c (meta_workspace_get_name): new function,
	and remove workspace->name field, instead just get the
	name from prefs each time

	* src/screen.c (meta_screen_update_workspace_names): update the
	gconf key to persist workspace names here, instead of changing
	the names we use

	* src/util.c (topic_name): add META_DEBUG_PREFS

	* src/prefs.c: change NUM_COMMANDS to 32 to allow more custom
	commands, implement workspace names

	* src/metacity.schemas.in: add workspace_names/name_NN gconf keys.
2002-11-03 19:06:39 +00:00
Christian Neumair
7f36a8c7d1 We want at least autoconf 2.5. 2002-11-02 10:39:31 +00:00
Havoc Pennington
817c357335 2.4.3 2002-10-29 06:31:54 +00:00
Havoc Pennington
b3a1122b2a use meta_prop_get_size_hints
2002-10-28  Havoc Pennington  <hp@redhat.com>

	* src/window.c (update_size_hints): use meta_prop_get_size_hints

	* src/xprops.c: add support for getting XSizeHints
2002-10-28 20:22:22 +00:00
Havoc Pennington
effec94613 store the window menu on the display and blow it away when a window
2002-10-28  Havoc Pennington  <hp@pobox.com>

	* src/window.c, src/display.c: store the window menu on the
	display and blow it away when a window closes, so we don't
	get funny stuck menus. Patch from Martin Garton #87514
2002-10-28 05:35:30 +00:00
Anders Carlsson
c9c67387ce Make XRandr detection work better.
2002-10-27  Anders Carlsson  <andersca@gnu.org>

	* configure.in: Make XRandr detection work better.
2002-10-27 15:15:27 +00:00
Havoc Pennington
81089c2d8c move meta_window_shutdown_group() much earlier in the destroy process. May
2002-10-27  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_free): move
	meta_window_shutdown_group() much earlier in the destroy process.
	May fix #96928 tracked down by Kjartan Maraas and Martin Garton.

	* src/group.c (meta_window_get_group): never add window to a group
	after we've started unmanaging the window
2002-10-27 14:45:29 +00:00
Havoc Pennington
04c9c3e058 include config.h
2002-10-26  Havoc Pennington  <hp@pobox.com>

	* src/iconcache.c: include config.h

	* src/group.c: include config.h

	* src/frame.c: include config.h

	* src/core.c: include config.h so it doesn't crash all over the
	place due to #ifdef HAVE_STARTUP_NOTIFICATION

	* src/util.c (meta_print_backtrace): export from this file

	* src/main.c (log_handler): print backtrace here
2002-10-27 03:03:32 +00:00
Havoc Pennington
4d5cc9d0bb make windows randomly transient for each other
2002-10-26  Havoc Pennington  <hp@pobox.com>

	* src/wm-tester/main.c (evil_timeout): make windows randomly
	transient for each other http://bugzilla.gnome.org/show_bug.cgi?id=96928
2002-10-26 21:56:50 +00:00
Havoc Pennington
0d88e93787 new function (meta_prop_get_wm_hints): new function
2002-10-26  Havoc Pennington  <hp@pobox.com>

	* src/xprops.c (meta_prop_get_text_property): new function
	(meta_prop_get_wm_hints): new function
	(meta_prop_get_class_hint): new function
2002-10-26 16:40:50 +00:00
Havoc Pennington
5a8af8c2fb use multi-value-get on a couple of properties for testing
2002-10-26  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_new): use multi-value-get on a couple
	of properties for testing

	* src/xprops.c (meta_prop_get_values): implement multi-value-get

	* src/window.c (update_mwm_hints): XFree motif hints as we changed
	it to use Xmalloc

	* src/xprops.c: massively rework this to set up a
	get-multiple-properties-at-once API.

	* src/async-getprop.c (ag_Xmalloc): new function
2002-10-26 07:37:11 +00:00
Havoc Pennington
cb27f0c4be Add "busy cursor on app startup" support, conditionally - works only if
2002-10-25  Havoc Pennington  <hp@pobox.com>

        Add "busy cursor on app startup" support, conditionally - works
	only if libstartup-notification is found, and in practice requires
	a GTK patch that's not in yet.

	* src/screen.c: monitor startup events and set busy cursor if
	appropriate

	* src/display.c (meta_display_open): create SnDisplay

	* configure.in: check for startup notification,
	and add the cute "configure summary" at the end
2002-10-25 23:35:50 +00:00
Havoc Pennington
c3a5c4c169 if only one right-corner button, use right_right_background not
2002-10-24  Havoc Pennington  <hp@redhat.com>

	* src/theme.c (meta_frame_layout_calc_geometry): if only one
	right-corner button, use right_right_background not
	right_left_background
2002-10-24 20:47:19 +00:00
Havoc Pennington
9702903343 make public
2002-10-24  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_get_icon_geometry): make public

	* src/screen.c (meta_screen_ensure_tab_popup): put the alt+tab
	highlight-window indicator on the icon, not the window itself,
	if the window is minimized.
2002-10-24 05:21:51 +00:00
Havoc Pennington
15a05467bd put minimized windows at the end of Alt+Tab, #89416
2002-10-24  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_get_tab_list): put minimized windows
	at the end of Alt+Tab, #89416
2002-10-24 05:15:28 +00:00
Havoc Pennington
0041f49d3f initialize the left button background rectangles.
2002-10-23  Havoc Pennington  <hp@redhat.com>

	* src/theme.c (meta_frame_layout_calc_geometry): initialize the
	left button background rectangles.
2002-10-23 19:46:44 +00:00
Havoc Pennington
c6b475b251 Optimizations for managing new windows (do not all take effect if
2002-10-21  Havoc Pennington  <hp@redhat.com>

	Optimizations for managing new windows (do not all take effect if
	METACITY_DEBUG=1). Bug #96404

	* src/keybindings.c (meta_change_keygrab): use error trap nesting
	and conditionalize on meta_is_verbose() to avoid a ton of XSync

	* src/display.c (meta_change_button_grab): ditto

	Throughout: move to new error trap setup to save on XSync calls,
	new setup is:

	* src/errors.c (meta_error_trap_push_with_return): new function,
	an error trap that needs to care about return value and thus
	sync even if an outer trap still exists
	(meta_error_trap_pop_with_return): new function
	(meta_error_trap_pop): add "last_request_was_roundtrip"
	argument allowing us to avoid XSync() if we just did
	a GetProperty or whatever.

	* src/util.c (meta_warning): flush the warning file descriptor

	* src/Makefile.am (INCLUDES): define G_LOG_DOMAIN
2002-10-21 21:44:35 +00:00
Havoc Pennington
0c5cacf7cc put multihead stuff in HAVE_GTK_MULTIHEAD, reported by John Palmieri
2002-10-20  Havoc Pennington  <hp@pobox.com>

	* src/ui.c (meta_image_window_new): put multihead stuff in
	HAVE_GTK_MULTIHEAD, reported by John Palmieri
2002-10-20 17:17:16 +00:00
Havoc Pennington
95e5a13131 check above->mapped before deciding if it overlaps the window being
2002-10-20  Havoc Pennington  <hp@pobox.com>

	* src/keybindings.c (handle_raise_or_lower): check above->mapped
	before deciding if it overlaps the window being raiselowered,
	fix from Stephane Chauveau
2002-10-20 15:22:40 +00:00
Jeremy Katz
c1a88f5457 make Xrandr check less noisy
2002-10-19  Jeremy Katz  <katzj@redhat.com>

       * configure.in: make Xrandr check less noisy
2002-10-19 16:18:00 +00:00
Havoc Pennington
70b6a57003 call meta_image_window_new in multihead-safe way
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/effects.c (meta_effects_draw_box_animation): call
	meta_image_window_new in multihead-safe way

	* src/ui.c (meta_image_window_new): multihead safety
2002-10-18 22:46:37 +00:00
Havoc Pennington
915c2db3b9 only create the resize popup if width_inc or height_inc are > 1
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_refresh_resize_popup): only create the
	resize popup if width_inc or height_inc are > 1

	* src/resizepopup.c: Clear out all the weird tickmark cruft,
	saves us about 2.5K of binary size, whee
	(meta_ui_resize_popup_new): take display/screen arguments and make
	multihead-safe #94349
2002-10-18 22:37:01 +00:00
Havoc Pennington
eb647577c3 don't start the cycle process if the binding for switching windows has no
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/keybindings.c (do_choose_window): don't start the cycle
	process if the binding for switching windows has no modifier bits,
	just focus the window immediately.

	* src/prefs.c, src/keybindings.c: add a keybinding to move between
	windows that goes in the opposite direction.  This is mostly
	useful if you want to bind unmodified keys to the switch windows
	functions, e.g. if you have "Forward" and "Back" keys on your
	keyboard. Patch from Shilad Sen <shilad sourcelight com>
2002-10-18 22:19:05 +00:00
Havoc Pennington
1094410ff8 add "what happens when you double click the titlebar" setting, patch from
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/prefs.c, src/frames.c: add "what happens when you double
	click the titlebar" setting, patch from Sean Middleditch bug
	#95625.  This is basically an "add Windows emulation mode" patch.
2002-10-18 21:22:27 +00:00
Havoc Pennington
6e90c238e8 move window-click to Super+click not Alt+click by default. Super should be
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/metacity.schemas.in: move window-click to Super+click not
	Alt+click by default. Super should be the Windows key on keyboards
	that have one and are so configured.  Prepare for the FAQ on this.
2002-10-18 19:07:42 +00:00
Havoc Pennington
44a63a9911 fix min aspect handling, patch from Martin Garton #94943
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/window.c (constrain_size): fix min aspect handling,
	patch from Martin Garton #94943
2002-10-18 18:58:05 +00:00
Andras Timar
149e8d12cd Added hu to ALL_LINGUAS.
2002-10-18  Andras Timar  <timar@gnome.hu>

        * configure.in: Added hu to ALL_LINGUAS.
2002-10-18 14:25:48 +00:00
Havoc Pennington
370982b812 replace the old apply_constraints with wacky new approach involving
2002-10-18  Havoc Pennington  <hp@pobox.com>

	* src/stack.c (constrain_stacking): replace the old
	apply_constraints with wacky new approach involving graphing all
	the constraints then walking the graph.  Fixes #94876 and probably
	other stacking bugs as well, thanks to Arvind for tracking down
	the issue.

	(compute_layer): add FIXME and reference to bug #96140
2002-10-18 06:05:09 +00:00
Havoc Pennington
5ba2fa893f don't place transient-for-whole-group windows above _each other_, only
2002-10-17  Havoc Pennington  <hp@redhat.com>

	* src/stack.c (apply_constraints): don't place
	transient-for-whole-group windows above _each other_, only
	above other windows in the group that aren't themselves
	transient-for-whole-group. Should help with part of #94876
2002-10-17 16:36:50 +00:00
Havoc Pennington
3da0b1c7d9 fix memory leak of group_windows, and don't use the variable name "tmp"
2002-10-17  Havoc Pennington  <hp@redhat.com>

	* src/stack.c (apply_constraints): fix memory leak of
	group_windows, and don't use the variable name "tmp" twice. Shadow
	variables bad.
2002-10-17 16:07:50 +00:00
Havoc Pennington
aa62466091 add code to create big stacks of dialogs transient for each other, for
2002-10-17  Havoc Pennington  <hp@redhat.com>

	* src/tools/metacity-window-demo.c (dialog_cb): add code to create
	big stacks of dialogs transient for each other, for testing.
2002-10-17 16:04:53 +00:00
Havoc Pennington
337812d51d workspaces are all per-screen now, fix accordingly
2002-10-16  Havoc Pennington  <hp@redhat.com>

	* src/workspace.c: workspaces are all per-screen now, fix
	accordingly

	* src/core.c: fix multihead workspace stuff

	* src/keybindings.c: multihead-rama

	* src/screen.c (meta_screen_show_desktop): new functions to
	replace display equivalents

	* src/display.c (meta_display_get_workspace_by_screen_index): get
	rid of this
	(meta_display_get_workspace_by_index): get rid of this
	(event_callback): handle _NET_SHOWING_DESKTOP message per-screen

	* src/screen.c (meta_screen_get_workspace_by_index): new function

	* src/screen.h (struct _MetaScreen): move workspace list, and
	showing_desktop flag, to be per-screen

	* src/window.c (window_query_root_pointer): return whether pointer
	is on window's screen
	(meta_window_handle_mouse_grab_op_event): don't use coordinates
	from other screens when updating a window operation on the current
	screen. I can't believe no one has reported this...
2002-10-16 20:12:24 +00:00
Havoc Pennington
17ac646f70 update window layer when above/below state is changed. Fixed by Ross
2002-10-16  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_client_message): update window layer
	when above/below state is changed. Fixed by Ross Burton.
2002-10-16 14:53:19 +00:00
Federico Mena Quintero
8c2e8ddf5c Ignore EnterNotify events when the detail field is set to NotifyInferior.
2002-10-14  Federico Mena Quintero  <federico@ximian.com>

	* src/display.c (event_callback): Ignore EnterNotify events when
	the detail field is set to NotifyInferior.  Fixes #95747.
2002-10-15 14:46:12 +00:00
Havoc Pennington
ae577d7724 button layout key
2002-10-12  Havoc Pennington  <hp@pobox.com>

	* src/metacity.schemas.in: button layout key

	* src/prefs.c: Add button layout gconf key
	(change_notify): use some "else if" instead of "if" where we
	should have been
2002-10-12 17:44:55 +00:00
Havoc Pennington
82e5cb578c don't raise window on button 2 click, only on button 1 and button 3.
2002-10-11  Havoc Pennington  <hp@redhat.com>

	* src/display.c (event_callback): don't raise window on button 2
	click, only on button 1 and button 3.

	* src/frames.c (meta_frames_button_press_event): lower on button 2
	press on frame

	* src/core.c (meta_core_user_lower): new function
2002-10-11 18:42:40 +00:00
Havoc Pennington
0df65b9f9f make the checks here allow windows larger than the screen in addition to
2002-10-11  Havoc Pennington  <hp@pobox.com>

	* src/stack.c (window_is_fullscreen_size): make the checks here
	allow windows larger than the screen in addition to
	exactly-screen-size

	* src/window.c (meta_window_configure_request): delete the "try to
	auto-enter-fullscreen-state" hack here, because it was broken, and
	the changes to the stacking code to move screen-size focused
	windows to the fullscreen layer should work better.
	(meta_window_new): remove auto-fullscreen hack from here too
2002-10-11 05:26:07 +00:00
Havoc Pennington
25ca0e21db also keep utility/menu/toolbar windows above their whole group.
2002-10-09  Havoc Pennington  <hp@pobox.com>

	* src/stack.c (apply_constraints): also keep utility/menu/toolbar
	windows above their whole group.

	(get_standalone_layer): don't use META_LAYER_FOCUSED_WINDOW, but
	only use META_LAYER_FULLSCREEN while the fullscreen window has
	focus.  Also, put screen-sized windows in the fullscreen layer,
	even if we didn't dare to actually put them in the fullscreen
	state.
2002-10-09 23:19:14 +00:00
Havoc Pennington
f08337d939 Add a modifier key preference for the Alt+click stuff. Can be set to
2002-10-07  Havoc Pennington  <hp@redhat.com>

        Add a modifier key preference for the Alt+click stuff.
	Can be set to "disabled" as well.

	* src/run-metacity.sh: load .Xmodmap in the Xnest if it exists

	* src/display.c (meta_display_ungrab_window_buttons): ungrab
	AnyModifier in case the modifier changed since we grabbed
	(meta_display_open): rearrange code to use meta_display_close() to
	mop up when we can't find any screens, avoiding the need to
	keep the bail-out code in sync with meta_display_close.

	* src/keybindings.c (devirtualize_modifiers): move this function
	to a public place in display.c

	* src/metacity.schemas.in: add setting for the modifier key
	to use for Alt+left/middle/right click.

	* src/prefs.c (update_binding): add a missing newline to a warning
	(meta_prefs_get_mouse_button_mods): new function

	* src/ui.c (meta_ui_parse_modifier): new function
2002-10-07 23:14:40 +00:00
Havoc Pennington
372dc090fd don't include unportable Xproto.h, fix from Glynn Foster.
2002-10-07  Havoc Pennington  <hp@pobox.com>

	* src/async-getprop.c: don't include unportable Xproto.h, fix from
	Glynn Foster.
2002-10-07 14:30:36 +00:00
Havoc Pennington
fc4a0aef0d change to add only one _XAsyncHandler per display, speeding things up a
2002-10-06  Havoc Pennington  <hp@pobox.com>

	* src/async-getprop.c: change to add only one _XAsyncHandler per
	display, speeding things up a bit.
2002-10-06 17:53:29 +00:00
Havoc Pennington
a1bb0e0015 Add wacky hack suggested by Keith Packard to get X properties
2002-10-06  Havoc Pennington  <hp@pobox.com>

	* src/async-getprop.c: Add wacky hack suggested by Keith Packard
	to get X properties asynchronously. Not actually used by metacity
	yet, but thinking about it.
2002-10-06 09:04:39 +00:00