1
0
Fork 0
Commit graph

107 commits

Author SHA1 Message Date
Havoc Pennington
d70e08039c also filter out LeaveNotify with NotifyInferior
2002-05-23  Havoc Pennington  <hp@pobox.com>

	* src/display.c (event_callback): also filter out LeaveNotify
	with NotifyInferior
2002-05-24 03:09:21 +00:00
Jayaraj Rajappan
49fe8f0399 fix for bugzilla bug #72314, filter out LeaveNotify caused by grabs when
2002-05-23  Jayaraj Rajappan <jayaraj.rajappan@wipro.com>

	* src/display.c (event_callback): fix for bugzilla bug #72314,
	filter out LeaveNotify caused by grabs when in mouse focus mode.
2002-05-24 02:55:54 +00:00
Havoc Pennington
0f1f2283e7 Crack from Erwann
2002-05-23  Havoc Pennington  <hp@pobox.com>

        Crack from Erwann

	* src/metacity.schemas: add autoraise crackrock

	* src/display.c (event_callback): autoraise window if autoraise is
	enabled

	* src/prefs.c: autoraise crack
2002-05-24 02:23:46 +00:00
Havoc Pennington
5f65ca07d7 use the layout information to figure out up/down neighbors
2002-05-15  Havoc Pennington  <hp@pobox.com>

	* src/workspace.c (meta_workspace_get_neighbor): use the layout
	information to figure out up/down neighbors

	* src/display.c (event_callback): catch propertynotify on
	_NET_DESKTOP_LAYOUT

	* src/screen.c (meta_screen_update_workspace_layout): keep track
	of the layout of workspaces as set by the pager
2002-05-16 04:03:36 +00:00
Anders Carlsson
af83598ad3 Add screen argument to meta_display_get_tab_next, since we only want
2002-05-11  Anders Carlsson  <andersca@gnu.org>

	* src/display.c: (find_tab_forward), (find_tab_backward),
	(meta_display_get_tab_next):
	* src/display.h:
	* src/keybindings.c: (handle_tab_forward), (handle_focus_previous):
	Add screen argument to meta_display_get_tab_next, since we only
	want windows on the same screen to appear in the tab chain.

	* src/screen.c: (meta_screen_new):
	Or the event mask with existing events since gtk+ may listen to
	certain events and we don't want to disable those events.

	(meta_screen_ensure_tab_popup):
	* src/tabpopup.c: (meta_ui_tab_popup_new):
	* src/tabpopup.h:
	Add a screen number argument to meta_ui_tab_popup_new so we
	can position the popup on the correct screen.
2002-05-11 06:59:54 +00:00
Havoc Pennington
9598affa03 add override redirect test window
2002-05-10  Havoc Pennington  <hp@pobox.com>

	* src/tools/metacity-window-demo.c: add override redirect test
	window

	* src/stack.c (raise_window_relative_to_managed_windows): new
	function, used to avoid moving windows above override redirect
	popup windows.

	* src/display.c (event_callback): don't lower panels on
	LeaveNotify if they have focus, #70895
2002-05-11 04:44:34 +00:00
Havoc Pennington
912afb6e6b DefaultScreen() returns the screen number not Screen*
2002-05-09  Havoc Pennington  <hp@redhat.com>

	* src/frames.c (show_tip_now): DefaultScreen() returns the screen
	number not Screen*

	* src/frame.c (meta_frame_sync_to_window): immediately repaint
	frame whenever we resize it, if we're inside a grab operation.

	* src/frames.c (meta_frames_repaint_frame): new function

	* src/window.c (meta_window_new): initialize window's colormap
	(meta_window_notify_focus): install the colormap for a window when
	it gets focus, uninstall on unfocus.

	* src/window.h (struct _MetaWindow): store window's colormap

	* src/display.c (event_callback): note changes to window colormap

	* src/frame.c (EVENT_MASK): add ColormapChangeMask
2002-05-09 22:34:00 +00:00
Havoc Pennington
6d2c558bd8 make Alt+button2 do a resize
2002-05-09  Havoc Pennington  <hp@redhat.com>

	* src/display.c (event_callback): make Alt+button2 do a resize
2002-05-09 21:22:01 +00:00
Anders Carlsson
0494b044d5 Add multi-screen support. Also add patch by Erwann Chenede to make
2002-05-08  Anders Carlsson  <andersca@gnu.org>

	* configure.in:
	* src/display.c: (meta_display_open):
	* src/fixedtip.c: (meta_fixed_tip_show):
	* src/fixedtip.h:
	* src/frames.c: (meta_frames_new), (show_tip_now):
	* src/frames.h:
	* src/menu.c: (meta_window_menu_new):
	* src/ui.c: (meta_ui_new):
	Add multi-screen support. Also add patch by Erwann Chenede
	to make tooltips appear on the correct screen.
2002-05-08 16:24:28 +00:00
Anders Carlsson
9138b9aa3c Fix atom name; it's _NET_SHOW_DESKTOP, not _NET_WM_SHOW_DESKTOP.
2002-05-07  Anders Carlsson  <andersca@gnu.org>

	* src/display.c: (meta_display_open), (event_callback),
	(meta_display_update_show_desktop_hint):
	* src/display.h:
	* src/screen.c: (set_supported_hint):
	Fix atom name; it's _NET_SHOW_DESKTOP, not
	_NET_WM_SHOW_DESKTOP.

	* src/frames.c: (meta_frames_unmanage_window):
	Restore the mouse cursor to default when unmanaging a window.
2002-05-07 14:42:47 +00:00
Anders Carlsson
7b9877258f Fix an off-by-one error.
2002-05-06  Anders Carlsson  <andersca@gnu.org>

	* src/display.c: (set_utf8_string_hint):
	Fix an off-by-one error.

	(meta_display_open),
	(event_callback), (meta_display_update_show_desktop_hint),
	(meta_display_show_desktop), (meta_display_unshow_desktop):
	* src/display.h:
	* src/screen.c: (set_supported_hint):
	Add support for _NET_WM_SHOW desktop, both as a message and
	as a root window property.
2002-05-06 06:11:46 +00:00
Havoc Pennington
e8267b20fe always raise windows on focus click, regardless of focus mode.
2002-04-29  Havoc Pennington  <hp@redhat.com>

	* src/display.c (event_callback): always raise windows on focus
	click, regardless of focus mode.
2002-04-29 20:20:38 +00:00
Anders Carlsson
53268f985f Add support for setting the _NET_WM_WORKAREA hint. No code does it yet
2002-04-28  Anders Carlsson  <andersca@gnu.org>

	* src/display.c: (meta_display_open):
	* src/display.h:
	* src/screen.c: (set_supported_hint):
	* src/workspace.c: (set_number_of_spaces_hint),
	(set_workarea_hint):
	Add support for setting the _NET_WM_WORKAREA hint. No code
	does it yet though.
2002-04-28 15:47:21 +00:00
Havoc Pennington
e4e200a1dc remove caveats about keybindings
2002-04-28  Havoc Pennington  <hp@pobox.com>

	* README: remove caveats about keybindings

	* src/metacity.schemas: add schemas for all the keybindings.

	* src/window.c (meta_window_activate): if in "show desktop" mode
	when a window is activated, leave show desktop mode. So e.g.
	when you click on a task in the task list, show desktop mode
	will be turned off.

	* src/workspace.c (meta_workspace_get_neighbor): new function
	that doesn't quite work yet (needs support for getting
	workspace layout from the pager)

	* src/prefs.c: keybindings stuff

	* src/keybindings.c: make keybindings configurable

	* src/ui.c (meta_ui_parse_accelerator): new function
2002-04-28 04:52:26 +00:00
Havoc Pennington
2a71cab8c4 reply immediately for windows that don't support _NET_WM_PING
2002-04-15  Havoc Pennington  <hp@redhat.com>

	* src/display.c (meta_display_ping_window): reply immediately for
	windows that don't support _NET_WM_PING

	* src/window.c (update_protocols): check whether windows
	support _NET_WM_PING
2002-04-15 22:14:06 +00:00
Havoc Pennington
d02060e201 new file containing all the wacky mess I just added to a simple "click the
2002-04-13  Havoc Pennington  <hp@pobox.com>

	* src/delete.c: new file containing all the
	wacky mess I just added to a simple "click the close button",
	contains all the dealing-with-dead-application cruft.
	Use metacity-window-demo to test by clicking the
	toolbar button that locks it up.
2002-04-13 04:58:45 +00:00
Havoc Pennington
fa0592ebc7 remove the unused tab stuff
2002-04-05  Havoc Pennington  <hp@pobox.com>

	* src/stack.c: remove the unused tab stuff

	* src/display.c: implement tab list among panels

	* src/keybindings.c: fill in move-between-panels keybindings
2002-04-05 15:52:49 +00:00
Havoc Pennington
bfc47ccd6e Add some total crackrock resize-grid indication for windows that have
2002-03-17  Havoc Pennington  <hp@pobox.com>

	* src/resizepopup.c: Add some total crackrock resize-grid
	indication for windows that have width_inc/height_inc
	so I can debug gnome-terminal sizing.
2002-03-17 17:22:23 +00:00
Havoc Pennington
11089cb824 use new functions
2002-03-11  Havoc Pennington  <hp@pobox.com>

	* src/keybindings.c: use new functions

	* src/display.c (meta_display_get_tab_next):
	(meta_display_get_tab_list): new tab order functions using
	MRU list instead of map order

	* src/window.c (meta_window_notify_focus): maintain focus MRU list

	* src/display.h (struct _MetaDisplay): Keep an MRU list of
	windows.
2002-03-12 04:34:17 +00:00
Havoc Pennington
35a2f2df76 support _NET_NUMBER_OF_DESKTOPS message so you can change number of
2002-03-10  Havoc Pennington  <hp@pobox.com>

	* src/display.c (event_callback): support _NET_NUMBER_OF_DESKTOPS
	message so you can change number of desktops with the pager

	* src/prefs.c (meta_prefs_set_num_workspaces): new function

	* src/display.c (meta_spew_event): print stacking aspects of
	configure request
2002-03-10 18:36:08 +00:00
Havoc Pennington
447eba6007 we didn't claim to support _NET_ACTIVE_WINDOW so gtk_window_present()
2002-03-10  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (set_supported_hint): we didn't claim to support
	_NET_ACTIVE_WINDOW so gtk_window_present() didn't work. Mumble.
	Only worked with tasklist because libwnck didn't check for
	WM support.

	* src/window.c (meta_window_free): clean off window state
	when windows are withdrawn, to avoid sticking dialogs
	to their initial desktop.
	(meta_window_queue_calc_showing): return if window is withdrawn
2002-03-10 15:48:38 +00:00
Havoc Pennington
fdb20df78b add some assertions
2002-03-06  Havoc Pennington  <hp@pobox.com>

	* src/core.c (meta_core_get_grab_frame): add some assertions

	* src/menu.c (meta_window_menu_new): make another warning
	into a verbose

	* src/display.c (meta_change_button_grab): use verbose rather than
	warning to log failures to grab button, since these are typically
	BadWindow from a destroyed window.
2002-03-07 03:46:12 +00:00
Havoc Pennington
262e6fab27 use hash_table_replace instead of g_hash_table_insert
2002-03-06  Havoc Pennington  <hp@redhat.com>

	* src/frames.c (meta_frames_manage_window): use hash_table_replace
	instead of g_hash_table_insert

	* src/main.c (main): only enable verbose/debug if you set
	METACITY_VERBOSE/METACITY_DEBUG

	* src/util.c (ensure_logfile): only use a log file if
	METACITY_USE_LOGFILE is set

	* src/display.c (meta_display_for_x_display): add warning if
	MetaDisplay isn't found

	* src/window.c (meta_window_free): add an assertion that we
	successfully cleared the grab window
2002-03-06 22:27:24 +00:00
Havoc Pennington
20a98e1c2a disable resize etc. if we're fullscreen (constrain_size): fix size
2002-03-02  Havoc Pennington  <hp@pobox.com>

	* src/window.c (recalc_window_features): disable resize etc. if
	we're fullscreen
	(constrain_size): fix size constraints when fullscreen

	* src/display.c (meta_display_open): fix missing comma that
	ended up concatenating two of the properties breaking
	FULLSCREEN state and PING protocol
2002-03-03 00:03:50 +00:00
Havoc Pennington
ac2aa5337d Add hacking to fix the problem that we made our XGrabPointer() during
2002-03-02  Havoc Pennington  <hp@pobox.com>

	* src/display.c: Add hacking to fix the problem that we made our
	XGrabPointer() during Alt+Tab actually succeed, so on popping down
	Alt+Tab we got an EnterNotify from the ungrab, which resulted in
	focusing the window under the mouse. i.e. Alt+Tab didn't work with
	sloppy focus.
2002-03-02 15:26:07 +00:00
Havoc Pennington
efa0ae8373 Screw around with Anders's ping patch so he'll get plenty of CVS
2002-02-26  Havoc Pennington  <hp@pobox.com>

        Screw around with Anders's ping patch so he'll get plenty of CVS
	conflicts. ;-)

	* src/display.c (meta_display_ping_window): spew warnings
	if we try to call this with CurrentTime
	(meta_display_ping_timeout): remove ping from the pending pings
	after it times out.

	* src/util.h: added PING debug category

	* src/display.c (remove_pending_pings_for_window): don't remove
	"tmp" just before "tmp->next", don't break out of loop after
	finding the first match
	(meta_display_open): no trailing comma in array init
	(event_callback): move the processing of ping replies into a
	separate function

	* src/screen.c (set_supported_hint): add _NET_WM_PING to supported
	list

	* src/display.h: change gpointer to void*

2002-02-26  Anders Carlsson  <andersca@gnu.org>

	* src/display.c: (ping_data_free),
	(remove_pending_pings_for_window), (meta_display_open),
	(event_callback), (meta_display_unregister_x_window),
	(meta_display_ping_timeout), (meta_display_ping_window),
	(meta_display_window_has_pending_pings):
	Implement meta_display_ping_window, and filter out scroll wheel
	events.

	* src/display.h:
	Add MetaWindowPingFunc, meta_display_ping_window and
	meta_display_window_has_pending_pings.
2002-02-27 02:05:39 +00:00
Havoc Pennington
bedddaa717 switch on the op passed in, not the active op. Gives us the right cursor
2002-02-24  Havoc Pennington  <hp@pobox.com>

	* src/display.c (xcursor_for_op): switch on the op passed in, not
	the active op. Gives us the right cursor during resizing, etc.

	* src/errors.c: rearrange all the error stuff to adapt to the GDK
	change a while back, so now we print our X errors again

	* src/display.c (meta_display_begin_grab_op): remove KeyPressMask
	and KeyReleaseMask from the XGrabPointer(), this caused BadValue
	and kept the grab from ever succeeding. Fixes the problem with the
	GTK resize grip - this is why you shouldn't break your X error
	spew. ;-)

	* src/display.c: debug spew tweaks

	* src/window.c (meta_window_client_message): do some
	s/verbose/topic/ stuff
2002-02-24 19:58:27 +00:00
Havoc Pennington
20218dac92 put in hack to keep Pango from mangling our server grab and locking up on
2002-02-19  Havoc Pennington  <hp@pobox.com>

	* src/ui.c (meta_ui_init): put in hack to keep Pango from mangling
	our server grab and locking up on startup. (hack doesn't work
	but I want to fix it on my real computer not this laptop)

	* src/window.c: Implement _NET_WM_STATE_FULLSCREEN

	* src/display.c (meta_display_open): add atoms for
	_NET_WM_STATE_FULLSCREEN
2002-02-23 22:58:02 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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