Commit Graph

60 Commits

Author SHA1 Message Date
Florian Müllner
e16beba111 mutter-window-demo: Port from GdkColor to GdkRGBA
GdkColor is about to be deprecated, so move to GdkRGBA instead.

https://bugzilla.gnome.org/show_bug.cgi?id=650586
2011-07-08 21:40:54 +02:00
Dan Winship
28752718c5 Remove meta_restart() / "mutter-message restart"
meta_restart() was broken, in that it restarted mutter with what was
left of argv after GOption and Clutter had possibly modified it.
Rather than try to fix this, just remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=643959
2011-03-07 18:03:43 -05:00
Benjamin Otte
8994e621f7 Replace some GDK X11 calls with future-proof ones
GTK is about to clean up its code and remove duplicate macros and
GdkDrawable usage. To prepare for that landing, we use the future-safe
versions of the same calls.

https://bugzilla.gnome.org/show_bug.cgi?id=636302
2010-12-03 00:17:42 +01:00
Florian Müllner
b445ee3763 Remove compatibility for GTK+-2.0
While the Meego developers agreed to switching mutter to GTK+-3.0
unconditionally a while ago, Canonical used a GTK+-2.0 build for their
Unity project. As Canonical now announced a switch to compiz as their
window manager, there is no longer a reason to maintain GTK+-2.0
compatibility.

https://bugzilla.gnome.org/show_bug.cgi?id=633133
2010-10-28 12:16:14 +02:00
Benjamin Otte
33489c8cb8 Adapt to GTK API changes
This code adapts mutter to the latest changes to GTK in
http://git.gnome.org/browse/gtk+/commit/?id=872ef111ecabf6cd4453590b1e17afd3c9757f28
that remove the dest argument from gdk_pixbuf_get_from_window() and
gdk_pixbuf_get_from_surface().

It also removes the dest argument from meta_gdk_pixbuf_get_from_pixmap()
to match. The function is internal and the argument wasn't used.

https://bugzilla.gnome.org/show_bug.cgi?id=631147
2010-10-02 04:27:05 +02:00
Benjamin Otte
9f5d8d1a2a Fix compilation against latest GTK3 changes
With the newest changes to GTK3, some things were changed. This patch
now uses the features introduced in gtk3-compat.h in previous patches.

This patch also introduces a macro named USE_GTK3 that is used to
differentiate between GTK3 and GTK2. Its main use is differenting
between expose and draw handlers for GtkWidget subclasses.

The draw vs expose handlers question is usually handled by using ifdefs
at the beginning and end to set up/tear down a cairo_t and then use it.

However, when the function is too different and too many ifdefs would be
necessary, two versions of the function are written. This is currently
the case for:
- MetaAccelLabel
- MetaFrames

https://bugzilla.gnome.org/show_bug.cgi?id=630203
2010-09-26 17:09:20 +02:00
Jasper St. Pierre
0d51d9e4cf Remove usage of 'gdk_display', a removed symbol in gtk3.
https://bugzilla.gnome.org/show_bug.cgi?id=629232
2010-09-10 15:18:06 -04:00
Florian Müllner
8a6b583cdc Adjust for API break in gdkkeysyms.h
The key symbols were renamed to avoid namespace conflicts with
gobject-introspection.
2010-09-09 17:37:48 +02:00
Nickolas Lloyd
42e786b15b Remove deprecated Gtk+ symbols
This patch removes all uses of deprecated Gtk+ symbols from mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=587991
2010-07-01 20:55:11 +02:00
Florian Müllner
c6c7b05d7b Add compatibility with GTK+ 2.18
To replace all calls to deprecated code, GTK+ 2.20 is required - add
some basic compatibility code, so that it is still possible to build
mutter with GTK+ 2.18 when not using -DGSEAL_ENABLE.

https://bugzilla.gnome.org/show_bug.cgi?id=595496
2010-05-12 11:02:52 +02:00
Javier Jardón
9e123695d0 Use accessor functions instead direct access.
GTK+ 2.20 is now the required version

Still missing:
GTK_MENU_SHELL ()->have_xgrab

https://bugzilla.gnome.org/show_bug.cgi?id=595496
2010-05-12 11:02:45 +02:00
Javier Jardón
cc46d2ebb4 Stop using gtk_toolbar_insert_stock()
Add helper functions instead of using this deprecated symbol.

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

A#	../stamp-mutter-marshal.h
2009-08-26 12:57:29 -04:00
Tomas Frydrych
ff9400abde Remove deprecated GTK symbols
http://bugzilla.gnome.org/show_bug.cgi?id=587991

(adapted from metacity commit 3f76affbd2,
original patch by Thomas Andersen)
2009-08-04 09:23:37 +01:00
Tomas Frydrych
e985bf0e7a use g_signal_handlers_disconnect_by_func instead of an old deprecated
http://bugzilla.gnome.org/show_bug.cgi?id=587991

(adapted from metacity commit a8f8970601,
original patch by Matt Kraai)
2009-08-04 09:22:49 +01:00
Jon Nettleton
51a6467968 Comprehensively rename to Mutter
Code:
All references in the code not related to themes, keybindings, or
GConf were changed from 'metacity' to 'mutter'. This includes, among other
things, strings, comments, the atoms used in the message protocol, and
the envvars used for debugging. The GConf schema file was reduced to
the 3 settings new to mutter.

The overall version was brought up to 2.27 to match current gnome.

Structure:
All files named '*metacity*' were renamed '*mutter*' with appropriate
changes in the automake system.  Files removed are
doc/creating_themes, src/themes, doc/metacity-theme.dtd,
metacity.doap.  These files will eventually end up in an external
gnome-wm-data module.

Installation location:
On the filesystem the mutter-plugindir was change from
$(libdir)/metacity/plugins/clutter to just $(libdir)/mutter/plugins.
The mutter-plugins.pc.in reflects these changes.

Note:
mutter.desktop.in and mutter-wm.desktop both continue to have
X-GNOME-WMSettingsModule=metacity set.  This allows
gnome-control-center to continue using libmetacity.so for
configuration.  This is fine since most the general keybindings and wm
settings are being read from /apps/metacity/* in gconf.
2009-06-16 14:17:10 -04:00
Thomas Thurman
1aee3eff35 Keep the compiler from giving some warnings.
2008-06-26  Thomas Thurman  <tthurman@gnome.org>

        Keep the compiler from giving some warnings.
        
        * src/compositor/compositor-xrender.c (xrender_begin_move,
          xrender_update_move, xrender_end_move, xrender_free_window): four
          functions which were never called and contain no code #iffed out.
        * src/tools/metacity-mag.c (grab_area_at_mouse): fixed typecast error.


svn path=/trunk/; revision=3769
2008-06-27 03:52:31 +00:00
Thomas Thurman
85631aec0f Lots of tiny fixes to make sure we compile with "gcc -ansi -Werror".
2008-02-27  Thomas Thurman  <tthurman@gnome.org>

	Lots of tiny fixes to make sure we compile with
	"gcc -ansi -Werror".


svn path=/trunk/; revision=3606
2008-02-27 04:39:10 +00:00
Elijah Newren
32d4bd6b63 Patch from Kjartan Maraas to fix a lot of tiny issues (unused variable
2006-01-20  Elijah Newren  <newren gmail com>

	* src/async-getprop.c:
	* src/common.h:
	* src/display.c:
	* src/eggaccelerators.c:
	* src/frames.c:
	* src/gradient.c:
	* src/iconcache.c:
	* src/keybindings.c:
	* src/metaaccellabel.c:
	* src/place.c:
	* src/prefs.c:
	* src/preview-widget.c:
	* src/screen.c:
	* src/session.c:
	* src/stack.c:
	* src/tabpopup.c:
	* src/theme-viewer.c:
	* src/theme.c:
	* src/window-props.c:
	* src/window.c:
	* src/workspace.c:
	* src/tools/metacity-window-demo.c:
	* src/wm-tester/test-gravity.c:
	* src/wm-tester/test-resizing.c:
	* src/wm-tester/test-size-hints.c:
	Patch from Kjartan Maraas to fix a lot of tiny issues (unused
	variable removal, making unused variables used again, correction
	of types passed/declared for printf arguments, removal of unneeded
	breaks and returns, dead code removal, dead code revival, renaming
	to prevent shadowed variables, declaring unexported functions as
	static) spotted by the intel compiler.  #321439
2006-01-20 22:03:56 +00:00
Alex Duggan
8235fa831f Remove deprecated capplet from GNOME 2.0
2004-12-07  Alex Duggan  <aldug@astrolinux.com>

	* configure.in:
	* src/tools/Makefile.am:

	Remove deprecated capplet from GNOME 2.0

	* src/tools/metacity-properties.c:
	* src/tools/metacity-properties.desktop.in:
	* src/tools/metacity-properties.glade:
	* src/tools/metacity-properties.png:

	Removed from cvs
2004-12-13 19:00:14 +00:00
Kjartan Maraas
43cc3b8606 A load of fixes of issues reported by sparse. Closes bug #152849
2004-09-17  Kjartan Maraas  <kmaraas@gnome.org>

	* src/bell.c: (meta_bell_flash_screen):
	* src/compositor.c:
	* src/effects.c: (meta_effects_draw_box_animation):
	* src/fixedtip.c: (meta_fixed_tip_show):
	* src/frame.c: (find_argb_visual):
	* src/frames.c: (unsigned_long_hash), (meta_frames_manage_window),
	(meta_frames_apply_shapes):
	* src/iconcache.c: (find_largest_sizes), (find_best_size):
	* src/keybindings.c: (meta_spawn_command_line_async_on_screen):
	* src/main.c: (main):
	* src/menu.c: (meta_window_menu_new):
	* src/prefs.c: (meta_prefs_get_visual_bell),
	(meta_prefs_bell_is_audible), (meta_prefs_get_visual_bell_type),
	(meta_prefs_get_action_double_click_titlebar),
	(meta_prefs_get_auto_raise), (meta_prefs_get_auto_raise_delay),
	(meta_prefs_get_reduced_resources):
	* src/screen.c: (meta_create_offscreen_window):
	* src/tabpopup.c: (meta_ui_tab_popup_get_selected):
	* src/theme-parser.c: (meta_theme_load):
	* src/theme.c: (meta_gtk_widget_get_font_desc):
	* src/tools/metacity-mag.c: (mouse_press), (begin_area_grab):
	* src/util.c: (meta_unsigned_long_hash): A load of fixes of issues
	reported by sparse. Closes bug #152849
2004-09-16 23:18:22 +00:00
Havoc Pennington
7c80b0a335 call bind_textdomain_codeset(), fix from Yukihiro Nakai bug #121743
2003-09-30  Havoc Pennington  <hp@redhat.com>

	* src/tools/metacity-message.c (main): call
	bind_textdomain_codeset(), fix from Yukihiro Nakai bug #121743
2003-09-30 19:59:15 +00:00
Bastien Nocera
a252050cb8 fix markup being ignored when a window title has a forbidden character in
2003-08-08  Bastien Nocera  <hadess@hadess.net>

	* src/metacity-dialog.c: (kill_window_question),
	(warn_about_no_sm_support): fix markup being ignored when a window
	title has a forbidden character in it (eg. "Send & Receive")
	* src/tools/metacity-window-demo.c: fix warning
2003-08-08 16:25:34 +00:00
Rob Adams
5727235572 Update window shaking loose so that the window is moved to the pointer and
2003-07-27  Rob Adams  <robadams@ucla.edu>

	* src/window.c (update_move):  Update window shaking loose so that
	the window is moved to the pointer and certain drag state is
	properly restored once windows "reattach".  Fix for #115000 based
	on the patch by Jurg Billeter.

	* src/screen.c (meta_screen_resize): Invalidate work areas after
	an xrandr screen size update.  Fix for #117230.

	* src/stack.c (window_is_fullscreen_size): Check the bottom corner
	of the window in addition to the top corner.  Fix for #118194.

	* src/constraints.c (meta_window_constrain): Support aspect ratio
	hints in the new constraints code.  Fix for #113798.

	* src/tools/metacity-window-demo.c (toggle_aspect_ratio): toggle
	the aspect ratio hints to force a 16:9 aspect ratio.
	(do_appwindow): add a button to toggle aspect ratio.
2003-07-28 02:09:20 +00:00
Rob Adams
971f3f1207 Update constraints code to support the new _NET_WM_STRUT_PARTIAL EWMH
2003-06-10  Rob Adams  <robadams@ucla.edu>

	Update constraints code to support the new _NET_WM_STRUT_PARTIAL
	EWMH draft specification.  See #86682.  Also, fix a bug involving
	work area invalidation on metacity startup.  Fix for #108497.
	Finally, some minor fixes for full screen windows.

	* src/window.h: Add new MetaStruts structure to store strut rects
	for a window.  Remove has_struts and do_not_cover flag, and
	support new MetaStruts instead of the four ints.

	* src/window.c (meta_window_new): change initialization to work
	with new struts.  Also, move meta_window_update_struts call to
	after the workspaces are initialized to fix #108497.  Remove
	do_not_cover and related code.
	(process_property_notify): add strut_partial
	(update_struts): change function name to meta_window_update_struts
	and expose in external MetaWindow API.  Support partial width
	struts and the new strut rects.

	* src/workspace.h: add new GSLists containing pointers to all
	relevant struts for this workspace.

	* src/workspace.c (meta_workspace_new): initialize the list of
	strut rects for this workspace.
	(meta_workspace_free): free the strut rect lists
	(ensure_work_areas_validated): support new struts and new strut
	rect lists.  Unleash the per-xinerama work areas.

	* src/constraints.c (get_outermost_onscreen_positions): Use the
	current window position along with the new per-workspace strut
	rects to compute the constraints that apply to a particular
	window.
	(constraint_hint_applies_func): don't do hints constraints on
	fullscreen windows
	(update_position_limits): for maximized windows use the work areas
	to set the position limits; for other windows rely on the struts
	constraints to be computed later in
	get_outermost_onscreen_positions
	(meta_window_constrain): don't apply aspect ratio hints to full
	screen windows

	* src/display.c (meta_display_open): add _NET_WM_STRUT_PARTIAL atom
	(meta_rectangle_equal): new helper function for MetaRectangles
	(event_queue_callback): #ifndef out if USE_GDK_DISPLAY not set to
	avoid compiler warning

	* src/display.h: add atom_net_wm_strut_partial, and add
	meta_rectangle_equal.

	* src/screen.c (meta_screen_rect_intersects_xinerama): change
	_window_intersects_ to _rect_intersects_ which is more useful now.
	(meta_screen_resize_func): update struts on windows with struts
	since struts are relative to the screen size, and this function is
	called when the screen size updates.

	* src/screen.h (meta_screen_rect_intersects_xinerama): change
	_window_intersects_ to _rect_intersects_ which is more useful now.

	* src/window-props.c (meta_display_init_window_prop_hooks): add
	hook for strut_partial

	* src/tools/metacity-window-demo.c: Support partial-width struts
	on the dock window tests for metacity testing purposes.
2003-06-26 03:09:38 +00:00
Havoc Pennington
a8526454b0 fix conditional so we get metacity-properties.c in the distribution
2003-01-22  Havoc Pennington  <hp@redhat.com>

	* src/tools/Makefile.am: fix conditional so we get
	metacity-properties.c in the distribution #103071
2003-01-22 19:40:04 +00:00
Havoc Pennington
fd8c3514d6 only install .desktop file for metacity-properties if we actually install
2002-12-13  Havoc Pennington  <hp@redhat.com>

	* src/tools/Makefile.am (Desktop_in_files): only install .desktop
	file for metacity-properties if we actually install
	metacity-properties

	* src/display.c (event_callback): not focusing on button 2 click
	was crack, revert that change.
2002-12-13 22:20:31 +00:00
Havoc Pennington
8d314aead8 make this always return FALSE for now, to avoid bug reports.
2002-12-08  Havoc Pennington  <hp@pobox.com>

	* src/prefs.c (meta_prefs_get_application_based): make this always
	return FALSE for now, to avoid bug reports.

	* src/util.c (ensure_logfile): put "opened log file" message on
	stderr so it will normally land in ~/.xsession-errors

	* configure.in: remove extra AC_ARG_PROGRAM

	* src/display.c (event_callback): handle the toggle-verbose message

	* src/tools/metacity-message.c: add a toggle-verbose message, been
	meaning to do this for a while.

	* src/util.c (meta_set_verbose): if verbose mode is enabled and we
	don't support it, then exit.

	* src/prefs.c: allow building without gconf (currently means some
	prefs are no-ops)

	* src/util.c, src/util.h: support defining macros to
	kill all verbose output entirely. (Removes the code and strings
	associated with it)

	* configure.in: don't get METACITY_PROPS_LIBS if not building the
	config dialog.
	(HAVE_GCONF): allow building sans gconf, if you are size-sensitive
	and not using gnome.
	(WITH_VERBOSE_MODE): add ability to disable all the verbose debug
	spew strings, to shrink the binary.
	(--disable-sm): allow SM support to be forced on or off
	(--disable-startup-notification): allow forcing this on or off
2002-12-08 19:17:17 +00:00
Havoc Pennington
214bcceaea conditionalize building the config dialog
2002-12-01  Havoc Pennington  <hp@pobox.com>

	* src/tools/Makefile.am: conditionalize building the config dialog

	* configure.in (BUILD_CONFIG_DIALOG): add --enable-config-dialog
	option to turn on the "window focus" dialog. This is part of
	deprecating this dialog.
2002-12-01 20:48:10 +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
4eb8a93c83 debug enhancements 2002-10-17 16:20: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
Arvind Samptur
195d136faa The suggested change in the tooltip as per ui-review. Not sure how long this dialog will be here. Anyway... 2002-09-19 09:25:55 +00:00
Havoc Pennington
cfa98e02fc fix compiler warnings
2002-09-12  Havoc Pennington  <hp@redhat.com>

	* src/workspace.c (meta_workspace_screen_index)
	(meta_workspace_index): fix compiler warnings

	* src/tools/metacity-window-demo.c (menu_items): add a test for
	dialogs with no transient parent

	* src/place.c (find_first_fit): Try placing window at origin of
	first Xinerama, even if there are no windows to place next to;
	makes placement work when no other windows are open on the screen.
2002-09-12 20:46:03 +00:00
Havoc Pennington
f1b58398b0 recalculate mapped-ness of frame after toggling decorations on/off, so
2002-08-24  Havoc Pennington  <hp@redhat.com>

	* src/window.c (process_property_notify): recalculate mapped-ness
	of frame after toggling decorations on/off, so that windows don't
	disappear when decorations are toggled on.

	* src/tools/metacity-window-demo.c (toggle_decorated_cb): add a
	test for toggling decoration state on the fly
2002-08-24 21:49:32 +00:00
Havoc Pennington
de42a62f4e Theme breakage! Themes have to implement "border" frames now, see Atlanta
2002-06-21  Havoc Pennington  <hp@pobox.com>

        Theme breakage! Themes have to implement "border" frames
	now, see Atlanta for an example. Fixes #84285

	* src/tools/metacity-window-demo.c (do_appwindow): add a
	border-only window

	* src/window.c (update_mwm_hints): read border only from the MWM
	hints

	* src/window.h (struct _MetaWindow): add border_only flag

	* src/core.c (meta_core_get_frame_type): report border type if
	required

	* src/common.h (enum): add META_FRAME_TYPE_BORDER
2002-06-22 03:23:02 +00:00
Jayaraj Rajappan
e0e6dab50f accessibility stuff for metacity-properties capplet. bug #84749. 2002-06-12 05:54:53 +00:00
Kjartan Maraas
400e82daa3 Someone forgot to mark the two strings in here for translation :)
2002-06-03  Kjartan Maraas  <kmaraas@gnome.org>

	* src/tools/metacity-properties.desktop.in: Someone forgot to mark
	the two strings in here for translation :)
2002-06-03 20:13:08 +00:00
Havoc Pennington
a242f622ea use $(prefix)/@DATADIRNAME@/locale for localedir to work with Solaris
2002-05-30  Havoc Pennington  <hp@pobox.com>

	* src/Makefile.am (INCLUDES): use $(prefix)/@DATADIRNAME@/locale
	for localedir to work with Solaris native gettext, patch from
	Hidetoshi Tajima

	* src/tools/Makefile.am: ditto
2002-06-01 15:00:25 +00:00
Anders Carlsson
d5e31129d5 Shush 2002-06-01 12:11:42 +00:00
Anders Carlsson
b7f1a5fae7 Shush 2002-06-01 12:10:28 +00:00
Havoc Pennington
3a745537f0 verbose-log on startup whether we were compiled with various extensions
2002-05-30  Havoc Pennington  <hp@redhat.com>

	* src/main.c (main): verbose-log on startup whether we were
	compiled with various extensions

	* src/display.c (meta_display_queue_retheme_all_windows): reapply
	shape mask when changing themes, sucks to do it here though, makes
	theme changing slower. Needs fixing.

	* src/theme-parser.c (parse_toplevel_element): parse rounded
	corner options to frame_geometry

	* src/frames.c (meta_frames_apply_shapes): apply rounded corners
	if requested by the theme

	* configure.in (HAVE_SHAPE): check for shape extension
2002-05-31 00:02:54 +00:00
Stephen Browne
bfd67fadef Rip out code for adding image to the dialog 2002-05-30 10:53:32 +00:00
Stephen Browne
2f74af1c04 UI changes as per HCI instructions 2002-05-30 10:49:19 +00:00
Stephen Browne
49f9ba96cc Changed metacity-properties window title to match its menu entry and be more consistent with other capplets 2002-05-30 09:49:15 +00:00
Havoc Pennington
f7c2b446f2 the miracle of cvs add 2002-05-30 02:26:58 +00:00
Havoc Pennington
737d3cbbf5 add a magnifier I'm using when making themes. Not installed.
2002-05-29  Havoc Pennington  <hp@redhat.com>

	* src/tools/metacity-mag.c: add a magnifier I'm using when making
	themes. Not installed.

	* src/tools/metacity-properties.c: reindentation, show window, add
	copyright info.

	* src/tools/metacity-properties.glade: make main window !visible
	on startup, to avoid funkiness.
2002-05-29 16:16:53 +00:00
Jacob Berkman
6aaf2738c9 dist .desktop.in files
2002-05-29  Jacob Berkman  <jacob@ximian.com>

	* src/tools/Makefile.am (EXTRA_DIST): dist .desktop.in files
2002-05-29 15:06:08 +00:00
Stephen Browne
31ba0b1f95 New config dialog for focus mode and autoraise 2002-05-29 11:54:12 +00:00
Havoc Pennington
41e99288b5 include locale.h, fix from Hidetoshi Tajima
2002-05-11  Havoc Pennington  <hp@pobox.com>

	* src/main.c: include locale.h, fix from Hidetoshi Tajima

	* src/window.c (meta_window_new): disable show desktop mode when a
	new window is managed.
2002-05-11 05:47:04 +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