Commit Graph

288 Commits

Author SHA1 Message Date
Anders Carlsson
813e6f459f Fix some bugs with prelighting.
2002-02-14  Anders Carlsson  <andersca@gnu.org>

	* src/themes/Crux/metacity-theme-1.xml: Fix some bugs with
	prelighting.
2002-02-13 23:30:55 +00:00
Anders Carlsson
0ed0c3bab6 Use pango_context_get_metrics instead of loading the font.
2002-02-13  Anders Carlsson  <andersca@gnu.org>

	* src/theme.c (meta_pango_font_desc_get_text_height): Use
	pango_context_get_metrics instead of loading the font.
2002-02-13 22:50:57 +00:00
Anders Carlsson
0ca04ed7aa Set prelit_control to META_FRAME_CONTROL_NONE.
2002-02-12  Anders Carlsson  <andersca@gnu.org>

	* src/frames.c (meta_frames_manage_window): Set prelit_control
	to META_FRAME_CONTROL_NONE.
	(meta_frames_update_prelit_control): New function for setting
	the prelit control.
	(meta_frames_paint_to_drawable): Set prelight state.
	(meta_frames_enter_notify_event): Update prelit control.
	(meta_frames_leave_notify_event): Likewise.
	(meta_frames_motion_notify_event): Likewise.

	* src/frames.h (struct _MetaUIFrame): add prelit_control.
2002-02-12 05:01:22 +00:00
Anders Carlsson
78478110fa and MWM_FUNC_ALL with hints->functions instead of hints->flags.
2002-02-12  Anders Carlsson  <andersca@gnu.org>

	* src/window.c (update_mwm_hints): and MWM_FUNC_ALL
	with hints->functions instead of hints->flags.
2002-02-12 01:02:42 +00:00
Anders Carlsson
1b0100792f Only disable functions if MWM_FUNC_ALL _is_ set, not when it isn't.
2002-02-12  Anders Carlsson  <andersca@gnu.org>

	* src/window.c (update_mwm_hints): Only disable functions if
	MWM_FUNC_ALL _is_ set, not when it isn't.
2002-02-12 00:31:26 +00:00
Anders Carlsson
a9b7683110 Set title_scale to 1.0.
2002-02-11  Anders Carlsson  <andersca@gnu.org>

	* src/theme.c (meta_frame_layout_new): Set title_scale to 1.0.
2002-02-11 16:28:17 +00:00
Anders Carlsson
a2d4594e19 Always set title_scale_val.
2002-02-11  Anders Carlsson  <andersca@gnu.org>

	* src/theme-parser.c (parse_toplevel_element): Always set
	title_scale_val.
2002-02-11 15:04:48 +00:00
Bastien Nocera
dffad0e982 - change default theme-viewer theme to be Atlanta 2002-02-11 03:58:50 +00:00
Havoc Pennington
e5b944ce09 add $(icon_DATA)
2002-02-10  Havoc Pennington  <hp@pobox.com>

	* src/tools/Makefile.am (EXTRA_DIST): add $(icon_DATA)

	* configure.in: 2.3.55

	* HACKING: update

	* README: update
2002-02-10 18:00:16 +00:00
Havoc Pennington
f5e9ff5a82 add a newline to an error message
2002-02-09  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (meta_theme_set_current): add a newline to an error
	message

	* src/themes/Gorilla: add Gorilla theme by Jakub Steiner ported to
	metacity by Kenneth Christiansen
2002-02-10 04:28:33 +00:00
Havoc Pennington
2bad2844f5 implement wacky "tile" draw op to lose some of the PNG files in Gorilla
2002-02-09  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (meta_draw_op_draw_with_env): implement wacky "tile"
	draw op to lose some of the PNG files in Gorilla theme

	* src/theme-parser.c: parse the tile primitive
2002-02-10 01:10:33 +00:00
Havoc Pennington
245c9c2d7e port to icon cache
2002-02-09  Havoc Pennington  <hp@pobox.com>

	* src/window.c (update_icon): port to icon cache

	* src/iconcache.c, src/iconcache.c: begin process of cleaning up
	window.c by moving the icon-reading code in here, based on the
	code in libwnck, which was in turn based on the earlier metacity
	code
2002-02-09 23:03:52 +00:00
Havoc Pennington
29a86695d1 hmm, and don't set last_window at all if we don't ++newp. Fixes even more
2002-02-09  Havoc Pennington  <hp@pobox.com>

	* src/stack.c (meta_stack_sync_to_server): hmm, and don't set
	last_window at all if we don't ++newp. Fixes even more obscure
	stacking bug.
2002-02-09 17:46:23 +00:00
Havoc Pennington
7b9eccb489 assign last_window prior to ++newp, so we don't try to stack windows with
2002-02-09  Havoc Pennington  <hp@pobox.com>

	* src/stack.c (meta_stack_sync_to_server): assign last_window
	prior to ++newp, so we don't try to stack windows with respect to
	themselves. Fixes some obscure stacking bugs.
2002-02-09 17:41:42 +00:00
Havoc Pennington
339bdf8dd2 try to make more error message strings the same, easier for translators
2002-02-09  Havoc Pennington  <hp@pobox.com>

	* src/theme-parser.c: try to make more error message strings the
	same, easier for translators

	* src/theme.c (meta_draw_op_free): free color spec for line op
	(meta_theme_free): free the integer_constants hash

	* src/theme-parser.c (parse_boolean): move above first use

	* src/theme-viewer.c: fixes for theme.h changes

	* src/frames.c (queue_recalc_func): don't recreate layout
	immediately, just save title text. should speed things up.
	(meta_frames_set_title): just remove the layout here also,
	and save title text.

	* src/theme-parser.c (parse_toplevel_element): parse title_scale
	attribute on frame_geometry

	* src/theme.c: support setting the text size

	* src/frames.c: support setting the text size

	* theme-format.txt: updates
2002-02-09 17:02:38 +00:00
Havoc Pennington
116fc5546f put in some kind of distinctive frame for UTILITY, though it's ugly. Also
2002-02-09  Havoc Pennington  <hp@pobox.com>

	* src/themes/Atlanta/metacity-theme-1.xml: put in some kind of
	distinctive frame for UTILITY, though it's ugly. Also put in the
	borderless look for maximized windows.

	* src/stack.c (compute_layer): put splash screen in the splash
	layer

	* src/stack.h (enum): create a splash screen layer

	* src/place.c (meta_window_place): center splashscreen, and fix a
	typo in the centering code

	* src/window.c (recalc_window_features): disable most features on
	splash screens

	* src/screen.c (set_supported_hint): add UTILITY and SPLASHSCREEN
	hints

	* src/window.c: add UTILITY, SPLASHSCREEN implementation

	* src/window.h (enum): add UTILITY, SPLASHSCREEN types

	* src/theme-parser.c (parse_toplevel_element): parser support
	for has_title attribute

	* src/theme.c (meta_frame_layout_get_borders): handle a has_title
	field in the layout, for utility windows that don't display a
	title (would be better to be able to shrink the title text,
	but that's kind of tricky to implement :-/)
2002-02-09 06:54:44 +00:00
Havoc Pennington
844a8ac13f add _NET_WM_STATE_HIDDEN to _NET_SUPPORTED
2002-02-08  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (set_supported_hint): add _NET_WM_STATE_HIDDEN
	to _NET_SUPPORTED

	* src/keybindings.c (meta_set_keybindings_disabled): put in header
	file, to fix warning.

	* src/display.c (meta_display_open): add _NET_WM_STATE_HIDDEN atom

	* src/window.c (set_net_wm_state): set _NET_WM_STATE_HIDDEN for
	shaded and minimized windows
	(meta_window_show): call set_net_wm_state() if we map the window
	or frame
	(meta_window_hide): call set_net_wm_state() if we unmap the window
	or frame
2002-02-09 04:50:58 +00:00
Havoc Pennington
bd712d7f8f only set skip pager/tasklist if the app set it, don't set it again based
2002-02-08  Havoc Pennington  <hp@pobox.com>

	* src/window.c (set_net_wm_state): only set skip pager/tasklist if
	the app set it, don't set it again based on semantic type.
2002-02-09 04:15:41 +00:00
Anders Carlsson
9d84a23cd1 If we're only scaling horizontally or vertically, use GDK_INTERP_NEAREST.
2002-02-08  Anders Carlsson  <andersca@gnu.org>

	* src/theme.c (scale_and_alpha_pixbuf): If we're only
	scaling horizontally or vertically, use GDK_INTERP_NEAREST.
2002-02-08 19:12:55 +00:00
Havoc Pennington
75fa1d1b09 grab buttons 2 and 3 also, so you can focus a window with those, #70840
002-02-08  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_grab_focus_window_button): grab
	buttons 2 and 3 also, so you can focus a window with those,
	#70840
	(event_callback): fix this to let you focus a window with any
	unmodified click, and also with Alt+button1

	* configure.in (AC_OUTPUT): add po/Makefile.in

	* autogen.sh: port to glib-gettextize, remove stupid
	auto-find-subdirs crap

	* Makefile.am (SUBDIRS): add po to subdirs, #70615

	* src/window.c (meta_window_activate): unshaded window if shaded,
	I thought this was in bugzilla but I don't see it. anyway thanks
	whoever mentioned it to me.
2002-02-08 06:50:09 +00:00
Havoc Pennington
ced833fdfc add modal dialog test
2002-02-08  Havoc Pennington  <hp@pobox.com>

	* src/tools/metacity-window-demo.c (menu_items): add modal dialog test
2002-02-08 06:22:24 +00:00
Havoc Pennington
51d9f9dce6 when mapping a window with struts, invalidate the work areas it's on.
2002-02-08  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_show): when mapping a window with
	struts, invalidate the work areas it's on. Should fix at least
	part of the problem with windows maximizing over panels.

	* src/workspace.c (meta_workspace_invalidate_work_area): also
	queue move/resize on sticky windows

	* src/tools/Makefile.am: consolidate reload-theme, restart into a
	"metacity-message" app and add enable/disable keybindings to the
	messages it knows about.

	* src/keybindings.c:
	(meta_change_keygrab): grab keyboard synchronously
	(meta_display_process_key_event): if all keybindings are toggled
	off, ReplayKeyboard, else AsyncKeyboard, except that the debug
	binding for toggling back on is always processed
	(meta_set_keybindings_disabled): function to disable/enable
	all keybindings
2002-02-08 06:01:58 +00:00
Havoc Pennington
43b67afc41 if DEMO_TEST is set then run the window demo
2002-02-07  Havoc Pennington  <hp@pobox.com>

	* src/run-metacity.sh: if DEMO_TEST is set then run the window
	demo

	* src/tools/metacity-window-demo.c: Create an app with all the
	semantic window types, for testing and for designing themes.
2002-02-08 04:44:56 +00:00
Havoc Pennington
d91715dc8f Throughout: move to meta_topic rather than meta_verbose so metacity.log
2002-02-07  Havoc Pennington  <hp@pobox.com>

        Throughout: move to meta_topic rather than meta_verbose so
	metacity.log can start being more useful

	* src/util.h (enum): add more debug topics

	* src/frames.c: clean up some cruft that caused warnings
2002-02-08 03:34:26 +00:00
Havoc Pennington
090096b1e2 do random voodoo on the algorithm
2002-02-07  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (colorize_pixbuf): do random voodoo on the algorithm
2002-02-07 06:24:10 +00:00
Havoc Pennington
d2061f8398 use the intensity of the gray pixel for both saturation and value, not
2002-02-07  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (colorize_pixbuf): use the intensity of the gray
	pixel for both saturation and value, not just value.
2002-02-07 05:46:40 +00:00
Havoc Pennington
835863e397 don't define the macro twice
2002-02-07  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (INTENSITY): don't define the macro twice
2002-02-07 05:15:37 +00:00
Havoc Pennington
e605dff37f get algorithm right (use HSV/RGB conversion) at cost of making it a lot
2002-02-07  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (colorize_pixbuf): get algorithm right (use HSV/RGB
	conversion) at cost of making it a lot slower. It doesn't matter
	anyhow with the cache, though.
2002-02-07 05:13:26 +00:00
Havoc Pennington
e6984e727c handle out-of-memory creating target pixbuf
2002-02-06  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (colorize_pixbuf): handle out-of-memory creating
	target pixbuf

	* src/themes/Crux/*.png: convert the green-channel images to grayscale
2002-02-07 05:01:56 +00:00
Havoc Pennington
5ad12fbe90 s/update_focus_mode/update_theme/ in case of theme key changing
2002-02-06  Havoc Pennington  <hp@pobox.com>

	* src/prefs.c (change_notify): s/update_focus_mode/update_theme/
	in case of theme key changing
2002-02-07 04:32:48 +00:00
Havoc Pennington
8f1cfefbb2 benchmark theme on startup
2002-02-06  Havoc Pennington  <hp@pobox.com>

	* src/theme-viewer.c: benchmark theme on startup

	* src/theme-parser.c (parse_draw_op_element): fix "colorize !=
	NULL" to "colorize_spec != NULL" and free pixbuf on color spec
	failure

	* src/theme.c (colorize_pixbuf): minor reformatting, raise
	function calls out of inner loop, clamp r/g/b values to uchar
	range before assigning to uchar
	(draw_op_as_pixbuf): cache the colorized pixbuf
	(meta_draw_op_free): free the cache pixbuf
2002-02-07 04:22:57 +00:00
Anders Carlsson
f33a46072b Add support for "colorize" image attribute.
2002-02-07  Anders Carlsson  <andersca@gnu.org>

	* src/theme-parser.c: (parse_draw_op_element):
	Add support for "colorize" image attribute.

	* src/theme.c: (colorize_pixbuf):
	New function that colorizes a pixbuf.

	(pos_tokenize): Allow "\n" as a whitespace character.

	(meta_draw_op_free): Free colorize_spec;

	(draw_op_as_pixbuf): Colorize image if needed.

	* src/theme.h: Add colorize_spec to struct.
2002-02-07 03:43:13 +00:00
Anders Carlsson
7279f2a9cd Add maximized and shaded_and_maximized frame styles.
2002-02-07  Anders Carlsson  <andersca@gnu.org>

	* src/themes/Crux/metacity-theme-1.xml: Add maximized and
	shaded_and_maximized frame styles.
2002-02-07 03:38:54 +00:00
Havoc Pennington
84c3050a7c redo window sizes/appearance when the theme changes
2002-02-06  Havoc Pennington  <hp@pobox.com>

	* src/main.c (prefs_changed_callback): redo window
	sizes/appearance when the theme changes

	* src/display.c (meta_display_retheme_all): new function

	* src/theme-parser.c (locate_attributes): remove error handling
	for MAX_ATTRS reached, add an assert instead, the way this code
	ended up the attrs in the array depend on the code not the theme
	file.
2002-02-07 03:25:34 +00:00
Havoc Pennington
8ae714eeae disable custom log handler and fatal mask for now
2002-02-06  Havoc Pennington  <hp@pobox.com>

	* src/main.c (main): disable custom log handler and fatal mask for
	now

	* src/theme.c (meta_draw_op_list_draw):
	Add META_DRAW_CLIP

	* src/main.c: load theme, monitor current theme setting

	* src/prefs.c: add "current theme" setting

	* src/stack.c (meta_stack_free): don't try to free
	last_root_children_stacked if it doesn't exist

	* src/themewidget.c: pluggable GtkMisc subclass to use
	for menu icons

	* src/screen.c (meta_screen_manage_all_windows): fix
	signed/unsigned warning

	* src/frames.c: port to theme system
	(meta_frames_style_set): chain up

	* theme-format.txt: new file

	* configure.in: add more compiler warnings

	* src/theme.c: add various stuff needed to get theme parser
	working. Remove the "spacer" concept from FrameLayout object.
	Add draw op that references a draw op list.

	* configure.in: require GTK 1.3.13

	* src/Makefile.am: add theme-parser.[hc], implement loading a
	theme

	* src/theme.c: add "draw title" and "draw window icon" operations
	(meta_draw_op_draw): put object_width/object_height in expression
	environment before computing x/y. Handle out-of-memory when
	creating pixbufs. Assorted other cleanups.
2002-02-07 03:07:56 +00:00
Anders Carlsson
2be2d8ccbe Simplify things so we can remove some now unnecessary .png files. Remove
2002-02-07  Anders Carlsson  <andersca@gnu.org>

	* src/themes/Crux/metacity-theme-1.xml:
	Simplify things so we can remove some
	now unnecessary .png files.
	* src/themes/Crux/*.png: Remove some files.
2002-02-06 23:49:59 +00:00
Anders Carlsson
41e5fbb963 src/themes/Crux/metacity-theme-1.xml Add Crux theme
2002-02-07  Anders Carlsson  <andersca@gnu.org>

	* src/themes/Crux/metacity-theme-1.xml
	* src/themes/Crux/*.png:
	Add Crux theme
2002-02-06 23:08:00 +00:00
Anders Carlsson
9c5809ce5e Add this so CVS won't prune the directory. 2002-02-06 23:02:45 +00:00
Havoc Pennington
089eb7e6de test % operator
2002-02-02  Havoc Pennington  <hp@pobox.com>

	* src/theme-viewer.c: test % operator

	* src/theme.c (pos_tokenize): add % to switch for operators

	* src/theme.c: rework theme stuff so we have
	MetaDrawOp/MetaDrawOpList instead of MetaTextureSpec/MetaShapeSpec
2002-02-02 05:09:19 +00:00
Havoc Pennington
f374f94644 fix shadowed variable (stupid -Wall should have that)
2002-01-28  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (meta_texture_spec_render): fix shadowed variable
	(stupid -Wall should have that)

	* src/theme-viewer.c (main): implement a simple
	viewer for frame styles

	* src/theme.c (meta_frame_style_get_test): create partial
	frame style to test drawing
2002-01-28 07:30:44 +00:00
Havoc Pennington
838d999d86 implement (meta_texture_spec_draw): implement shape spec and blank texture
2002-01-27  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (meta_shape_spec_draw): implement
	(meta_texture_spec_draw): implement shape spec and blank
	texture support
	(meta_frame_style_draw): implement
2002-01-28 05:16:04 +00:00
Havoc Pennington
8ddeb4f953 move in here so util.c doesn't require display.[hc]
2002-01-27  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_set_syncing): move in here so util.c doesn't
	require display.[hc]

	* src/theme.h, src/theme.c: implement coordinate expression
	parser, write MetaShapeSpec declaration

	* src/util.c (meta_exit): move in here so we can link
	to util.c with a different main()

	* src/theme.h: rename the MetaWindow* enums to MetaFrame*
2002-01-28 02:09:12 +00:00
Havoc Pennington
b52ee424e4 Only consider the bottom of the titlebar a resize control; I keep
2002-01-27  Havoc Pennington  <hp@pobox.com>

	* src/frames.c (get_control): Only consider the bottom of the
	titlebar a resize control; I keep accidentally resizing windows
	instead of activating them. Also, give south resizing priority
	over north, if the window is so small the active regions overlap

	* src/theme.c: add MetaTheme, get MetaFrameStyleSet into
	a usable state

	* src/common.h: move window type back to window.h, decided
	not to use it on frame side
	(MetaFrameType): add this instead
2002-01-27 08:21:53 +00:00
Havoc Pennington
5b4e9c01cc implement all kinds of crazy compositing-one-texture-onto-another BS.
2002-01-27  Havoc Pennington  <hp@pobox.com>

	* src/theme.h, src/theme.c: implement all kinds of crazy
	compositing-one-texture-onto-another BS.
2002-01-27 07:32:46 +00:00
Havoc Pennington
7eac9e4958 make the check for whether to eat focus click a lot more complicated
2002-01-27  Havoc Pennington  <hp@pobox.com>

	* src/display.c (event_callback): make the check for whether to
	eat focus click a lot more complicated

	* src/window.c (meta_window_same_application): new function

	* src/prefs.h, src/prefs.c: add application based pref

	* src/metacity.schemas: add "application_based" setting to
	give me a mode to fool with being application based,
	without being unusable in the meantime. Yeah the crack flows
	freely these days. Everyone knew it would happen.
2002-01-27 05:50:34 +00:00
Havoc Pennington
855d19cc0a separate code to draw frame from the expose_event handler, so in principle
2002-01-27  Havoc Pennington  <hp@pobox.com>

	* src/frames.c: separate code to draw frame from the
	expose_event handler, so in principle we can draw the
	frame to a pixmap, but this isn't used yet.
2002-01-27 05:27:11 +00:00
Havoc Pennington
5fdb8463de cheesy client with static bit gravity, used to test the below change.
2002-01-19  Havoc Pennington  <hp@pobox.com>

	* src/wm-tester/test-resizing.c: cheesy client with static
	bit gravity, used to test the below change.

	* src/window.c (meta_window_move_resize_internal): implement
	Owen's proposal for window resizing.
	http://mail.gnome.org/archives/wm-spec-list/1999-November/msg00088.html

	Currently you have to do METACITY_USE_STATIC_GRAVITY=1 in order to
	use it, because some GDK bug is screwing up exposes on my frames
	when it's enabled.

	* src/display.c (meta_display_create_x_cursor): fix glyph for
	NE/NW cursors

	* src/frames.c (get_control): add ability to resize from top

	* src/frame.c (meta_frame_get_flags): can't resize shaded windows
	(meta_frame_sync_to_window): add gravity arg

	* src/common.h (MetaWindowType): move here from window.h so
	it can be used in themes stuff.
	(MetaFrameFlags): remove META_FRAME_TRANSIENT since it
	overlaps with window type and was unused.
2002-01-19 23:59:11 +00:00
Havoc Pennington
19d2e8c7e1 give priority to keeping NW corner onscreen rather than SE, if we need to
2002-01-18  Havoc Pennington  <hp@pobox.com>

	* src/window.c (constrain_position): give priority to keeping NW
	corner onscreen rather than SE, if we need to shift the window
	to fit inside constraints

	* src/frames.c (meta_frames_get_geometry): don't depend on the
	current window size

	* src/theme.c: move geometry stuff in here, to be calculated as
	part of the theme

	* src/core.c (meta_core_get_client_size): new function to replace
	meta_core_get_frame_size() so we don't have weird cycles
	in the geometry calculation
2002-01-19 03:50:03 +00:00
Havoc Pennington
3194faaa9c fix crash when grab failed due to another operation in progress
2002-01-15  Havoc Pennington  <hp@redhat.com>
	* src/keybindings.c (handle_tab_backward): fix crash
	when grab failed due to another operation in progress
	(handle_tab_forward): fix crash when grab failed
2002-01-15 23:19:06 +00:00
Havoc Pennington
229589616f only bump unmaps_pending if the window was mapped
2002-01-10  Havoc Pennington  <hp@pobox.com>

	* src/frame.c (meta_window_destroy_frame): only bump
	unmaps_pending if the window was mapped
	(meta_window_ensure_frame): ditto

	* src/keybindings.c: change arrow key bindings to use Ctrl+Alt not
	just Alt, and add debug mode key bindings

	* src/stack.c (meta_stack_get_default_focus_window): don't choose
	a default focus window with unmaps pending, since we probably just
	unmapped it.

	* src/display.c (event_callback): move notify_focus on UnmapNotify
	after the window_free check, so we can move focus to another
	window when we unmanage

	* src/window.c (meta_window_hide): invalidate work areas when
	hiding a window with struts
	(meta_window_free): invalidate work areas when unmanaging a window
	with struts
2002-01-11 03:31:14 +00:00
Havoc Pennington
b2bbb306f4 store strut information, update it on property changes, etc. etc. so we
2002-01-09  Havoc Pennington  <hp@pobox.com>

	* src/window.c, src/window.h: store strut information,
	update it on property changes, etc. etc. so we avoid panel
	on maximize.

	* src/workspace.c (meta_workspace_get_work_area): add accessor for
	work area so we can compute it lazily

	* src/display.h, src/display.c: add _NET_WM_STRUT atom
	and _WIN_HINTS atom
2002-01-10 06:31:31 +00:00
Havoc Pennington
402c0b5036 add code to save ACLOCAL_FLAGS
2002-01-08  Havoc Pennington  <hp@pobox.com>

	* configure.in (ACLOCAL): add code to save ACLOCAL_FLAGS

	* src/frames.c (meta_frames_expose_event): max dither

	* src/testgradient.c (render_simple): change dither mode to MAX
	to avoid banding

	* src/theme.c: lose the gradient cache, and put in some initial
	data types for the theme format
2002-01-08 07:23:35 +00:00
Havoc Pennington
9ed27d3dcb make gradient a bit more subtle (don't go to the full background, but to a
2002-01-07  Havoc Pennington  <hp@redhat.com>

	* src/frames.c (meta_frames_expose_event): make gradient a bit
	more subtle (don't go to the full background, but to a blend of
	selection and background; put lighter color on top)
2002-01-07 21:35:02 +00:00
Havoc Pennington
f36ba88085 put in attempted fix for the GTK 1.2 plug/socket screwup, now that my
2002-01-06  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_notify_focus): put in attempted fix
	for the GTK 1.2 plug/socket screwup, now that my fixed debug spew
	reveals what's actually happening. ;-)

	* src/gradient.c (meta_gradient_description_new): object
	to store gradient descriptions

	* src/window.c (meta_window_notify_focus): fix the debug spew
	that was confusing me

	* src/wm-tester/focus-window.c: add little program to focus
	a window ID
2002-01-07 03:26:09 +00:00
Havoc Pennington
ac85e1e225 change to use spiffy gradient code.
2002-01-06  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (meta_theme_get_gradient): change to use spiffy
	gradient code.

	* src/gradient.c: copy lovely gradient code from WindowMaker,
	as usual Dan and Alfredo have very nice code
2002-01-06 17:52:21 +00:00
Havoc Pennington
8b680dfdd2 draw titlebar highlight with snazzy gradient that needs some tweaking to
2002-01-05  Havoc Pennington  <hp@pobox.com>

	* src/frames.c (meta_frames_expose_event): draw titlebar highlight
	with snazzy gradient that needs some tweaking to be less
	dumb-looking

	* src/theme.c: replace old theme.[hc] contents with newer stuff
	that doesn't do anything
2002-01-06 04:51:53 +00:00
Havoc Pennington
3d1d70b727 GTK 1.2 plug/socket clients still broken, don't know why.
2002-01-05  Havoc Pennington  <hp@pobox.com>

        GTK 1.2 plug/socket clients still broken, don't know why.

	* src/screen.c (meta_screen_new): select focus change on root
	window, for debugging

	* src/display.c (event_callback): when unfocusing, use
	no_focus_window to hold the focus

	* src/display.h (struct _MetaDisplay): have a no_focus_window to
	hold the focus when we don't want to have anything focused.
	Then we can avoid confusing focusing-the-frame stuff.

	* src/window.c (meta_window_notify_focus): improve some debug spew
	(meta_window_notify_focus): add hack from WindowMaker to ignore
	focus in events with detail > NotifyNonlinearVirtual
2002-01-06 03:15:49 +00:00
Havoc Pennington
06ec2b948f don't lower docks when a grab causes them to get LeaveNotify
2002-01-04  Havoc Pennington  <hp@pobox.com>

	* src/display.c (event_callback): don't lower docks when a grab
	causes them to get LeaveNotify
2002-01-04 22:46:37 +00:00
Havoc Pennington
60f48e44ff set event mask on root window to 0 so other window managers (such as
2002-01-04  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (meta_screen_free): set event mask on root window
	to 0 so other window managers (such as ourselves restarting) can
	start up; addresses race condition on restart where the old WM
	still had RedirectMask when the new WM was trying to start up.

	* src/display.c (meta_display_close): free each screen

	* src/window.c (meta_window_show): always focus new windows in
	click-to-focus mode
2002-01-04 22:18:10 +00:00
Havoc Pennington
501a60ab20 use meta_XFree not XFree
2002-01-03  Havoc Pennington  <hp@pobox.com>

	* src/window.c: use meta_XFree not XFree

	* src/display.h (meta_XFree): add null-safe XFree

	* src/util.c (meta_warning): have message prefix indicate that
	it's a warning
	(meta_fatal): indicate it's an error

	* src/window.c (update_sm_hints): clean up using
	meta_prop_get_latin1_string
	(update_role): ditto
	(read_client_leader): clean up using meta_prop_get_window
	(update_net_wm_type): clean up using meta_prop_get_cardinal
	(update_initial_workspace): ditto
	(update_net_wm_type): clean up using meta_prop_get_atom_list
	(read_rgb_icon): get result from XGetWindowProperty return value
	not from error trap
	(update_kwm_icon): ditto
	(meta_window_new): fix to read WM_STATE correctly
2002-01-04 03:25:53 +00:00
Havoc Pennington
b9701454b8 clean up using meta_prop_get_atom_list (update_mwm_hints): clean up using
2002-01-03  Havoc Pennington  <hp@pobox.com>

	* src/window.c (update_net_wm_state): clean up using
	meta_prop_get_atom_list
	(update_mwm_hints): clean up using meta_prop_get_motif_hints

	* src/Makefile.am (metacity_SOURCES): add xprops.[hc]

	* src/xprops.c: new file with convenience functions for X
	properties
2002-01-04 00:58:39 +00:00
Havoc Pennington
ee1361fb6e focus top window when switching to a new workspace
2002-01-03  Havoc Pennington  <hp@pobox.com>

	* src/workspace.c (meta_workspace_activate): focus top window when
	switching to a new workspace

	* src/util.c (meta_topic): start putting verbose output in
	categories

	* src/window.c (meta_window_shade): focus frame after we queue
	the calc_showing so the maps/unmaps have already happened.

	* src/display.c (meta_display_get_current_time): add the "get time
	of current event" function and call it occasionally.

	* src/window.c (meta_window_free): if we have focus, call
	meta_screen_focus_top_window().
	(meta_window_minimize): ditto
	(meta_window_delete): ditto

	* src/screen.c (meta_screen_ensure_tab_popup): fix memory leak -
	didn't free tab list
	(meta_screen_focus_top_window): new function to use when we unmap
	or unmanage a focused window

	* src/stack.c (meta_stack_get_default_focus_window): function used
	in meta_screen_focus_top_window
2002-01-03 23:28:19 +00:00
Havoc Pennington
86e9191d34 add a server grab here since we were failing to have one when calling the
2001-12-21  Havoc Pennington  <hp@redhat.com>

	* src/frame.c (meta_window_ensure_frame): add a server grab
	here since we were failing to have one when calling the function
2002-01-02 17:42:14 +00:00
Havoc Pennington
69dae32c37 Rework the click-client-area-to-focus support to use synchronous grabs,
2001-12-10  Havoc Pennington  <hp@pobox.com>

        Rework the click-client-area-to-focus support to use synchronous
	grabs, avoids a big mess, lets us pass through click when
	required (for dock/desktop). Disadvantage is all left-button
	clicks now require window manager approval. ;-)

	* src/display.c (event_callback): don't focus dock/desktop when
	the mouse enters them; require a click.
	(meta_change_button_grab): allow sync grabs
	(meta_display_grab_unfocused_window_buttons): establish a
	synchronous grab and maintain it all the time, rename to
	meta_display_grab_focus_window_button

	* src/window.c: change to reflect display.c
2001-12-11 04:03:58 +00:00
Havoc Pennington
ac7524508b oops, unbreak this _again_ - reported by Josh Barrow
2001-12-10  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_update_unfocused_button_grabs): oops,
	unbreak this _again_ - reported by Josh Barrow
2001-12-11 03:06:55 +00:00
Havoc Pennington
4af0425d72 don't allow grab on docks/desktop for now; needs fixing later to do the
2001-12-10  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_update_unfocused_button_grabs): don't
	allow grab on docks/desktop for now; needs fixing later to
	do the grab, but pass thru click, so we can focus those windows.
	And in fact we need to do that even in sloppy mode.
2001-12-10 16:15:45 +00:00
Havoc Pennington
fa803fd88f fix broken "tmp = tmp->data"
2001-12-10  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (meta_screen_foreach_window): fix broken
	"tmp = tmp->data"

	Implement do-not-pass-thru-click for click-to-focus mode.

	* src/screen.c (update_focus_mode): when focus mode changes,
	update all the window grabs

	* src/display.c (meta_display_grab_unfocused_window_buttons):
	implement grabbing button 1 on client area of unfocused
	click-to-focus windows

	* src/window.c (meta_window_update_unfocused_button_grabs): update
	whether we're grabbing unmodified button 1 on client area
	according to focus state and focus mode
	(meta_window_new): start out with proper grab state
2001-12-10 07:48:21 +00:00
Havoc Pennington
3fa131695b don't do mnemonics for workspaces above 9
2001-12-10  Havoc Pennington  <hp@pobox.com>

	* src/menu.c (meta_window_menu_new): don't do mnemonics for
	workspaces above 9
2001-12-10 06:56:21 +00:00
Havoc Pennington
7fa28277a1 oops, remove extra workspace creation, and update to current pref.
2001-12-10  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (meta_screen_new): oops, remove extra workspace
	creation, and update to current pref.
2001-12-10 05:47:33 +00:00
Havoc Pennington
041b33c450 update number of workspaces hint
2001-12-09  Havoc Pennington  <hp@pobox.com>

	* src/workspace.c (meta_workspace_free): update number of
	workspaces hint

	* src/screen.c (update_num_workspaces): implement number of
	workspaces setting

	* src/window.c (meta_window_configure_request): honor configure
	requests on windows of type NORMAL, but still be mean to those of
	type DIALOG

	* src/main.c (main): add more log domains to those we set a log
	handler for, and only set warnings fatal in debug mode

	* src/metacity.schemas: add number of workspaces setting
2001-12-10 03:55:26 +00:00
Havoc Pennington
06a0c62f86 in click-to-focus mode don't focus on enter notify. Implement unfocusing
2001-12-09  Havoc Pennington  <hp@pobox.com>

	* src/display.c (event_callback): in click-to-focus mode don't
	focus on enter notify. Implement unfocusing on LeaveNotify in
	mouse focus mode. Click to focus just ends up working if we
	do nothing on enter/leave, because of the way things already
	worked. Except I need to add some relatively complex hack to
	allow clicking on client area, right now you have to click
	on the frame.
2001-12-10 00:38:21 +00:00
Havoc Pennington
6981a8198b move SM init a bit later in the process, and init prefs
2001-12-09  Havoc Pennington  <hp@pobox.com>

	* src/main.c (main): move SM init a bit later in the process, and
	init prefs

	* src/session.c: fix no SM case (though I hardly know why I'm
	bothering)

	* src/main.c (main): call bindtextdomain

	* src/util.h (_): actually call gettext

	* configure.in: put in AM_GLIB_GNU_GETTEXT and gconf stuff

	* src/prefs.c: Preferences - this marks the beginning of our doom.
	None of them are actually implemented yet, but we monitor
	some stuff from gconf.
2001-12-09 22:41:12 +00:00
Havoc Pennington
b3778e4470 initial schemas file 2001-12-09 20:41:07 +00:00
Havoc Pennington
8c8d500495 when unminimizing an app, if we're in "show desktop" (all windows
2001-12-07  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_unminimize): when unminimizing an app,
	if we're in "show desktop" (all windows minimized) mode, leave
	show desktop mode. Will occasionally be a bit weird, but allows
	people to recover via task list if they accidentally do the show
	desktop thing, and don't know what's going on.
2001-12-07 06:33:30 +00:00
Havoc Pennington
e312daffd5 fix gdkatom/xatom screwup - gee, I should read my warnings
2001-12-06  Havoc Pennington  <hp@redhat.com>

	* src/ui.c (meta_text_property_to_utf8): fix gdkatom/xatom screwup
	- gee, I should read my warnings
2001-12-07 00:54:32 +00:00
Laszlo Peter
3f05f34286 add a dummy element to the enum so the signals array is not empty. (breaks
2001-12-03  Laszlo Peter  <laca@ireland.sun.com>

        * src/frames.c: add a dummy element to the enum so
          the signals array is not empty. (breaks the build with Forte C)

        * src/window.c: s/__FUNCTION__/G_GNUC_FUNCTION/
2001-12-03 15:22:57 +00:00
Havoc Pennington
248487a63c change so that window can be offscreen to the bottom or the right, as long
2001-11-27  Havoc Pennington  <hp@pobox.com>

	* src/window.c (constrain_position): change so that window can be
	offscreen to the bottom or the right, as long as a small top-left
	corner of the window remains onscreen. However, windows still
	can't go off the left or top.
2001-11-27 05:14:57 +00:00
Havoc Pennington
420c29dea9 add error trap
2001-11-26  Havoc Pennington  <hp@redhat.com>

        * src/window.c (window_query_root_pointer): add error trap
2001-11-27 03:41:43 +00:00
Laszlo Peter
6bae734d41 protect meta_verbose from a NULL pointer.
2001-11-02  Laszlo Peter  <laca@ireland.sun.com>

	* src/window.c (update_sm_hints): protect meta_verbose from
	a NULL pointer.
2001-11-02 14:55:00 +00:00
Havoc Pennington
ff5315d551 handle queue/unqueue of calc showings as we are iterating over the pending
2001-10-29  Havoc Pennington  <hp@pobox.com>

	* src/window.c (idle_calc_showing): handle queue/unqueue of
	calc showings as we are iterating over the pending list
	(meta_window_show): focus placed transients in here instead
	of in meta_window_place - now it should actually work, yay

	* src/place.c (meta_window_place): remove focusing of transient
	child from here; this was really broken
2001-10-30 02:00:53 +00:00
Havoc Pennington
3b9c81f390 note exciting new unminimize feature for the tab popup
2001-10-29  Havoc Pennington  <hp@pobox.com>

	* README: note exciting new unminimize feature for the tab popup

	* src/keybindings.c (process_tab_grab): use meta_window_activate()
	when choosing a window with tab popup, this should deiconify it

	* src/window.c (meta_window_client_message): use
	meta_window_activate for _NET_ACTIVE_WINDOW message
	(meta_window_activate): new function to raise/focus/unminimize
	(meta_window_flush_calc_showing): new function
	(meta_window_focus): force a calc showing on focus, so that we can
	focus the window if appropriate (it must be mapped)
2001-10-29 07:00:46 +00:00
Havoc Pennington
f663a511b3 fix for ignoring NumLock on Alt-windowclick (previous NumLock fix was only
2001-10-26  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_grab_window_buttons): fix for
	ignoring NumLock on Alt-windowclick (previous NumLock fix
	was only for key grabs not button grabs)
2001-10-26 04:00:38 +00:00
Havoc Pennington
3e92e3b1df set the current workspace hint
2001-10-25  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_new): set the current workspace hint
2001-10-26 03:54:55 +00:00
Havoc Pennington
d080f816b6 I was using meta_workspace_contains_window() in a number of places where
2001-10-25  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_visible_on_workspace):
	I was using meta_workspace_contains_window() in a number of
	places where on_all_workspaces should also have been considered,
	thus this new function. Fixes bugs such as pinned windows
	not appearing in the tab order.
	(meta_window_client_message): use meta_window_visible_on_workspace

	* src/stack.c (find_tab_forward): ditto
	(find_tab_backward): ditto
	(meta_stack_get_tab_next): ditto
	(meta_stack_get_tab_list): ditto

	* src/place.c (get_windows_on_same_workspace): ditto

	* src/keybindings.c (handle_focus_previous): ditto
	(handle_focus_previous): ditto
2001-10-25 04:51:25 +00:00
Havoc Pennington
bacc9c0afc use bg/fg not base/text for the window title area.
2001-10-24  Havoc Pennington  <hp@pobox.com>

	* src/frames.c (meta_frames_expose_event): use bg/fg not base/text
	for the window title area.
2001-10-25 03:08:48 +00:00
Havoc Pennington
2af36b1e56 support initial on-all-workspaces setting
2001-10-24  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_new): support initial
	on-all-workspaces setting
2001-10-25 01:39:36 +00:00
Havoc Pennington
7069fc9b50 fix to keep desktop window from appearing on top of everything else, among
2001-10-22  Havoc Pennington  <hp@pobox.com>

	* src/stack.c (meta_stack_sync_to_server): fix to keep desktop
	window from appearing on top of everything else, among other stack
	bugs. Untested.
2001-10-23 00:55:29 +00:00
Havoc Pennington
01a5b5762d use queried attributes to check whether window should be initially
2001-10-15  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_new): use queried attributes to check
	whether window should be initially maximized, rather than window
	rect
2001-10-15 04:39:05 +00:00
Havoc Pennington
1c1f4d7c93 add a restart feature, for debugging
2001-10-15  Havoc Pennington  <hp@pobox.com>

	* src/main.c (meta_restart): add a restart feature, for debugging

	* src/tools/metacity-restart.c: little utility program to trigger
	the restart
2001-10-15 04:14:58 +00:00
Havoc Pennington
a29c93a95a raise/focus windows on left-click, seem to have broken that yesterday
2001-10-14  Havoc Pennington  <hp@pobox.com>

	* src/frames.c (meta_frames_button_press_event): raise/focus
	windows on left-click, seem to have broken that yesterday

	* src/keybindings.c, src/display.c, src/window.c: add keybinding
	to show/hide all normal windows (so you can see the desktop).
	Currently Ctrl+Alt+D, which I don't like, but yay.
2001-10-15 03:39:41 +00:00
Havoc Pennington
842eb3fa93 take a window mapped at fullscreen size/pos to desire maximization; once I
2001-10-14  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_new): take a window mapped at
	fullscreen size/pos to desire maximization; once I add a
	fullscreen state, will change to copy kwin and take this mapping
	as a desire for fullscreen, but for now testing with maximization.

	* src/window.h: remove fullscreen window type, now proposing it
	as a window state instead.

2001-10-14  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_maximize): always raise windows on
	maximize
	(meta_window_client_message): when activating a window, move
	it to current workspace, instead of moving user to the
	window's workspace.
2001-10-14 22:13:53 +00:00
Havoc Pennington
282b52d6b7 only handle events here if the modmask from our button grab is active.
2001-10-14  Havoc Pennington  <hp@pobox.com>

	* src/display.c (event_callback): only handle events here if
	the modmask from our button grab is active. i.e. only the
	Alt-click is handled here.

	* src/frames.c: add check for whether button presses are in the
	frame client area before handling them, so we don't weirdly let
	you move a frame by clicking in its client area if the client
	hasn't selected button press events.
2001-10-14 04:11:42 +00:00
Havoc Pennington
9c8824542e set last window before setting newp, so we don't get the current window as
2001-10-13  Havoc Pennington  <hp@pobox.com>

	* src/stack.c (meta_stack_sync_to_server): set last window before
	setting newp, so we don't get the current window as the last
	window and screw everything up
	(IN_TAB_CHAIN): use type not layer to decide if a window is
	in the tab chain, keeps panel out of alt-tab choices
2001-10-13 04:42:28 +00:00
Havoc Pennington
e8bc8e95e2 add bad hack to work with GTK 1.3.9.90 RPMs from gnomehide for now
2001-10-13  Havoc Pennington  <hp@redhat.com>

	* configure.in: add bad hack to work with GTK 1.3.9.90 RPMs from
	gnomehide for now

	* src/ui.c: another piece of bad hack in here
2001-10-13 04:15:25 +00:00
Havoc Pennington
ec4edcb78c hmm, fix build
2001-10-13  Havoc Pennington  <hp@pobox.com>

	* src/session.c (meta_session_init): hmm, fix build
2001-10-13 04:02:59 +00:00
Havoc Pennington
94c3b02eef makefile tweak, add a comment to frame.c 2001-10-13 04:00:08 +00:00
Havoc Pennington
f83ac8476c set the session manager priority so we start up before other apps.
2001-10-12  Havoc Pennington  <hp@pobox.com>

	* src/session.c (meta_session_init): set the session manager
	priority so we start up before other apps.
2001-10-12 04:52:53 +00:00
Mikael Hallendal
4edccc4eb5 use gdk_pixbuf_new_from_inline (meta_ui_get_default_mini_icon): use
2001-10-12  Mikael Hallendal  <micke@codefactory.se>

	* src/ui.c (meta_ui_get_default_window_icon): use
	gdk_pixbuf_new_from_inline
	(meta_ui_get_default_mini_icon): use
	gdk_pixbuf_new_from_inline
2001-10-12 00:20:02 +00:00
Havoc Pennington
e55ead0419 fix mem leak of the MetaStack object (meta_stack_sync_to_server): try to
2001-10-10  Havoc Pennington  <hp@pobox.com>

	* src/stack.c (meta_stack_free): fix mem leak of the MetaStack
	object
	(meta_stack_sync_to_server): try to avoid the restack-flicker
	thing
2001-10-11 01:29:20 +00:00
Havoc Pennington
f22b9dfd94 set _NET_ACTIVE_WINDOW hint
2001-10-07  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_update_active_window_hint):
	set _NET_ACTIVE_WINDOW hint

	* src/window.c (meta_window_client_message): support
	_NET_ACTIVE_WINDOW client message
2001-10-07 23:06:19 +00:00