Compare commits

...

30 Commits

Author SHA1 Message Date
Owen W. Taylor
c5874e0da5 Bump version to 2.27.2 2009-08-10 12:24:03 -04:00
Colin Walters
422cd1fbbf Fix use of uninitialized memory in edge-resistance.c
g_new bad, g_new0 good.
2009-08-09 23:40:22 -04:00
Colin Walters
8a9e2877da Export meta_screen_get_startup_sequences, add change signal
It's useful for plugins to be able to get access to the
startup-notification data that Mutter already has.  Add
an accessor and change signal when recieve an event.
2009-08-09 23:36:08 -04:00
Kjartan Maraas
ff84b35e5d Updated Norwegian bokmål translation. 2009-08-09 15:48:46 +02:00
Tomas Frydrych
ae32ac86b4 Use correct timestamp for focus stealing prevention
When window initially maps, use the more recent of NET_WM_USER_TIME and
startup notification timestamps to compare against last known user action to
decide whether to focus the window or not. Once we show the window, clear
the initial_timestamp_set flag, so the startup notification timestamp is not
taken into account again.

Based on patch for metacity by Alexander Larsson

http://bugzilla.gnome.org/show_bug.cgi?id=573922
2009-08-08 17:59:01 +01:00
Tomas Frydrych
bca3eaf709 Removed custom 'GIR' label for gir generation in silent-rules mode
http://bugzilla.gnome.org/show_bug.cgi?id=591120
2009-08-08 13:47:31 +01:00
Tomas Frydrych
0f64202a29 Added --enable-silent-rules if automake-1.11 is available 2009-08-07 17:58:02 +01:00
Tomas Frydrych
6b36e64e00 Take extra reference on the texture inside MutterWindow
We store a pointer to the texture independently of the ClutterContainer
internals, and rely on the pointer remaining valid until we run dispose.
Since we also provide public API to access this pointer, we should not
rely on the reference ClutterContainer holds to ensure that texture will
not be destroyed (e.g., some nasty developer could reparent the texture).
2009-08-07 17:38:11 +01:00
Tomas Frydrych
84059f1faa Free MutterWindow description string in finalize() not dispose()
We were freeing the description string in dispose and not setting it to NULL,
thus leaving around a dangling pointer for the duration of the disposal.
This commit moves the free into the finalize vfuction, where it belongs.
2009-08-07 16:47:43 +01:00
Owen W. Taylor
15376957f7 Don't allow override-redirect windows to be META_WINDOW_NORMAL
Many override-redirect windows (including the Metacity UI windows!)
will have NET_WM_WINDOW_TYPE_NORMAL set on them because of shared
code paths with normal windows in toolkits.

Some current Compositor plugins (default plugin and gnome-shell)
check type == NORMAL to determine if to run effects. While fixing
such plugins to also check if the window is override-redirect is
posisble, it seems cleanest to simply not allow any of the decorated
window types to be set on an override-redirect window and to force
these types to META_WINDOW_OVERRIDE_OTHER. This will prevent other
similar problems from showing up in the future.

http://bugzilla.gnome.org/show_bug.cgi?id=590971
2009-08-06 12:16:24 -04:00
Owen W. Taylor
da934be354 Elimitate use of arithmetic expansion for portability
Use expr rather than $(( <arithmetic> )) - this is needed at least
for the default Solaris shell.

Based on patch by Halton Huo
http://bugzilla.gnome.org/show_bug.cgi?id=590719
2009-08-04 11:18:43 -04:00
Tomas Frydrych
3eee6b4218 Handle FocusIn events for override redirect windows correctly
Do not try to insert / remove the window from the MRU list; just reset the
MetaDisplay focus window to NULL.

http://bugzilla.gnome.org/show_bug.cgi?id=590611
2009-08-04 14:31:13 +01: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
Tomas Frydrych
245908909b Fix check for zero-sized textures in MutterShaped texture
Patch by Jon Nettleton <jon.nettleton@gmail.com>

http://bugzilla.openedhand.com/show_bug.cgi?id=1538
http://bugzilla.gnome.org/show_bug.cgi?id=590646
2009-08-04 08:47:46 +01:00
Xu Li
2f63d321d1 [constraints] Avoid overflow when window maximum size hint is set to INT_MAX
When calculating maximum permissible size of our frame window, we need to
avoid an overflow if the application set its max size hint to INT_MAX.

http://bugzilla.gnome.org/show_bug.cgi?id=590627
2009-08-04 08:38:56 +01:00
Tomas Frydrych
2222cb8fbf Added public prototype for meta_window_is_ancestor_of_transient()
http://bugzilla.gnome.org/show_bug.cgi?id=590439
2009-08-04 08:32:36 +01:00
Tomas Frydrych
897814a153 Added MetaWindow::window-type property
Read-only property for querying the type of MetaWindow.

http://bugzilla.gnome.org/show_bug.cgi?id=588230
2009-08-04 08:06:30 +01:00
Tomas Frydrych
8b7b41df41 Accessors for pid and name of client machine associated with MetaWindow
http://bugzilla.gnome.org/show_bug.cgi?id=590388
2009-08-04 07:58:11 +01:00
Tomas Frydrych
8f9a174f0a Fixed warnings due to missing casts 2009-08-01 11:11:11 +01:00
Colin Walters
df90187e06 Add focus-window property to MetaDisplay
Useful mainly for notify::focus-window.
2009-08-01 04:38:26 -04:00
Tomas Frydrych
c9e0613b53 Set up correct initial values for override redirect windows
As a sideffect of commit a576f7a1ea, override
redirect windows of type _NET_WM_WINDOW_TYPE_NORMAL do not have their
features recalculated during MetaWindow construction (same as regular
windows of type _NET_WM_WINDOW_TYPE_NORMAL), so we need to set the initial
values accordingly.
2009-08-01 09:11:06 +01:00
Tomas Frydrych
a576f7a1ea Tolerate all standard _NET_WM_WINDOW_TYPE types for managed windows
Although the spec designates some window types as typically used for
override redirect windows, it does not prohibit the use of these with
managed windows, so we should not abort if we encounter one of these.

http://bugzilla.gnome.org/show_bug.cgi?id=583870
2009-07-31 19:11:54 +01:00
Owen W. Taylor
239b39cf52 Pass through all scroll events to compositor
As with other events, we want to pass through scroll events (button 4/5 presses)
to the compositor, whether or not they are associated with a particular MetaWindow;
do this by simply falling through to the normal code path instead of
separately delivering the events to the compositor.

http://bugzilla.gnome.org/show_bug.cgi?id=588232
2009-07-31 10:37:26 -04:00
Thomas Wood
1f90529365 Don't explicitly set the size of the MutterWindow texture
Setting the size of the texture causes the minimum and preferred width and
height values to be fixed at the set value. The normal requisition functions
of ClutterTexture will already report the size of the texture pixmap as the
natural size, but also allow scaling down as needed if less space is
available. We don't need that here, but we want to allow someone to make
a ClutterClone of the texture actor.
2009-07-31 13:36:59 +01:00
Colin Walters
acfc498344 Also update Clutter 1.0 pkg-config requirement and README
We need to also change the pkg-config requirement to be 1.0.
2009-07-29 13:04:18 -04:00
Colin Walters
a1ac1f4b2e Build using Clutter 1.0
Clutter just released 1.0, sync to that.
2009-07-29 12:08:53 -04:00
Owen W. Taylor
d91d503eb2 Pass event to clutter when the plugin doesn't have xevent_filter
With recent changes, Clutter no longer sets up the viewport correctly,
unless it receives ConfigureNotify events. If there is a plugin with
an xevent_filter function, then it's that plugins responsibility to pass
the event to Clutter if it doesn't want it. If there is no plugin,
or the plugin doesn't have an xevent_filter function, then we should
call clutter_x11_handle_event() ourselves.

http://bugzilla.gnome.org/show_bug.cgi?id=589419
2009-07-28 16:00:24 -04:00
Owen W. Taylor
e84bf7144c Queue redraws on MutterWindow's MutterShapedTexture
When a windows contents or shape changes, we schedule a redraw
with clutter_actor_queue_redraw(); we need to queue the redraw
on the shaped texture rather than on the window actor to support
cloning of just the shaped texture without the shadow: that
is, the shaped is what is really changing and it may be
visible via a clone even if the MutterWindow itself is not
visible.

http://bugzilla.gnome.org/show_bug.cgi?id=589429
2009-07-28 15:50:28 -04:00
Owen W. Taylor
ec2c197e1f Fix confusion about MetaPreview in introspection build
MetaPreview is only built into libmutter-private, and not included in
the mutter executable. Linking mutter against libmutter-private was
inadvertently added when the introspection build process was set up,
but isn't actually needed, and if -Wl,-as-needed is added during the
build process, then the libmutter-private dependency will be skipped.

* Don't link mutter (or the test programs) against libmutter-private

* Exclude meta-preview.h from the set of headers we feed into the
  introspection build process

Reported by Patryk Zawadzki

http://bugzilla.gnome.org/show_bug.cgi?id=587975
2009-07-17 07:56:19 -04:00
31 changed files with 718 additions and 904 deletions

2
README
View File

@@ -20,7 +20,7 @@ libstartup-notification at
http://www.freedesktop.org/software/startup-notification/ or on the
GNOME ftp site. You also need GConf 1.2 (unless building a funky
extra-small embedded metacity with --disable-gconf, see below).
You need Clutter 0.9.3. You need gobject-introspection 0.6.3.
You need Clutter 1.0. You need gobject-introspection 0.6.3.
REPORTING BUGS AND SUBMITTING PATCHES
===

View File

@@ -4,7 +4,7 @@ m4_define([mutter_major_version], [2])
m4_define([mutter_minor_version], [27])
# Fibonacci sequence for micro version numbering:
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
m4_define([mutter_micro_version], [1])
m4_define([mutter_micro_version], [2])
m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version])
@@ -18,6 +18,7 @@ AC_CONFIG_SRCDIR(src/core/display.c)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([no])],)
AM_MAINTAINER_MODE
MUTTER_MAJOR_VERSION=mutter_major_version
@@ -227,8 +228,8 @@ else
AC_MSG_ERROR([no. Mutter requires the Xcomposite extension to build.])
fi
CLUTTER_VERSION=0.9.3
CLUTTER_PACKAGE=clutter-0.9
CLUTTER_VERSION=1.0.0
CLUTTER_PACKAGE=clutter-1.0
AC_SUBST(CLUTTER_PACKAGE)
if $PKG_CONFIG --atleast-version $CLUTTER_VERSION $CLUTTER_PACKAGE ; then
MUTTER_PC_MODULES="$MUTTER_PC_MODULES $CLUTTER_PACKAGE "
@@ -540,9 +541,10 @@ mutter-$VERSION:
Xcursor: ${have_xcursor}
"
MUTTER_MINOR_VERSION=mutter_minor_version
if test $(( $(echo $MUTTER_MINOR_VERSION) %2)) == "1"; then
stable_version=$(( ($MUTTER_MINOR_VERSION / 2) * 2))
if expr $MUTTER_MINOR_VERSION % 2 > /dev/null ; then
stable_version=`expr $MUTTER_MINOR_VERSION - 1`
echo "This is the UNSTABLE branch of mutter"
echo -n "Use 2.$stable_version.x for stable "
echo "(gnome-2-$stable_version branch in Subversion)"

1053
po/nb.po

File diff suppressed because it is too large Load Diff

View File

@@ -147,6 +147,8 @@ libmutter_private_la_LIBADD = @MUTTER_LIBS@
libmutterincludedir = $(includedir)/mutter/mutter-private
# Headers installed for plugins; introspected information will
# be extracted into Mutter-<version>.gir
libmutterinclude_base_headers = \
include/alttabhandler.h \
include/boxes.h \
@@ -154,7 +156,6 @@ libmutterinclude_base_headers = \
include/main.h \
include/util.h \
include/common.h \
ui/preview-widget.h \
ui/theme-parser.h \
ui/theme.h \
include/prefs.h \
@@ -171,7 +172,10 @@ libmutterinclude_base_headers = \
include/mutter-window.h
# Excluded from scanning for introspection but installed
# preview-widget.h: only part of libmutter-private
# atomnames.h: macros cause problems for scanning process
libmutterinclude_extra_headers = \
ui/preview-widget.h \
include/atomnames.h
libmutterinclude_HEADERS = \
@@ -198,7 +202,7 @@ typelib_DATA = Meta-$(api_version).typelib
# We need to strip out the attribute that would point back to libmutter-introspect
# so that libgirepository looks for symbols in the executable instead
Meta-$(api_version).gir: $(G_IR_SCANNER) mutter $(libmutterinclude_HEADERS) $(mutter_SOURCES)
pwd=`pwd` ; \
$(AM_V_GEN) pwd=`pwd` ; \
cd $(srcdir) && \
$(G_IR_SCANNER) \
--namespace=Meta \
@@ -206,8 +210,8 @@ Meta-$(api_version).gir: $(G_IR_SCANNER) mutter $(libmutterinclude_HEADERS) $(mu
--include=GObject-2.0 \
--include=Gdk-2.0 \
--include=Gtk-2.0 \
--include=Clutter-0.9 \
--pkg=clutter-0.9 \
--include=Clutter-1.0 \
--pkg=clutter-1.0 \
--pkg=gtk+-2.0 \
--include=xfixes-4.0 \
--program=$$pwd/mutter \
@@ -217,11 +221,11 @@ Meta-$(api_version).gir: $(G_IR_SCANNER) mutter $(libmutterinclude_HEADERS) $(mu
-o $$pwd/$@
Meta-$(api_version).typelib: $(G_IR_COMPILER) Meta-$(api_version).gir
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. $(G_IR_COMPILER) Meta-$(api_version).gir -o $@
$(AM_V_GEN) LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. $(G_IR_COMPILER) Meta-$(api_version).gir -o $@
endif
EFENCE=
mutter_LDADD=@MUTTER_LIBS@ libmutter-private.la $(EFENCE)
mutter_LDADD=@MUTTER_LIBS@ $(EFENCE)
mutter_LDFLAGS=-export-dynamic
mutter_theme_viewer_LDADD= @MUTTER_LIBS@ libmutter-private.la
@@ -232,9 +236,9 @@ testasyncgetprop_SOURCES=core/async-getprop.h core/async-getprop.c core/testasyn
noinst_PROGRAMS=testboxes testgradient testasyncgetprop
testboxes_LDADD= @MUTTER_LIBS@ libmutter-private.la
testgradient_LDADD= @MUTTER_LIBS@ libmutter-private.la
testasyncgetprop_LDADD= @MUTTER_LIBS@ libmutter-private.la
testboxes_LDADD= @MUTTER_LIBS@
testgradient_LDADD= @MUTTER_LIBS@
testasyncgetprop_LDADD= @MUTTER_LIBS@
@INTLTOOL_DESKTOP_RULE@
@@ -304,7 +308,7 @@ CLEANFILES += $(MUTTER_STAMP_FILES)
mutter-marshal.h: stamp-mutter-marshal.h
@true
stamp-mutter-marshal.h: Makefile mutter-marshal.list
$(GLIB_GENMARSHAL) \
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
--prefix=_mutter_marshal \
--header \
$(srcdir)/mutter-marshal.list > xgen-tmh && \
@@ -313,7 +317,7 @@ stamp-mutter-marshal.h: Makefile mutter-marshal.list
echo timestamp > $(@F)
mutter-marshal.c: Makefile mutter-marshal.list
(echo "#include \"mutter-marshal.h\"" ; \
$(AM_V_GEN) (echo "#include \"mutter-marshal.h\"" ; \
$(GLIB_GENMARSHAL) \
--prefix=_mutter_marshal \
--body \
@@ -324,16 +328,16 @@ mutter-marshal.c: Makefile mutter-marshal.list
mutter-enum-types.h: stamp-mutter-enum-types.h Makefile
@true
stamp-mutter-enum-types.h: $(mutter_source_h) mutter-enum-types.h.in
( cd $(srcdir) && \
$(AM_V_GEN) ( cd $(srcdir) && \
$(GLIB_MKENUMS) \
--template $(srcdir)/mutter-enum-types.h.in \
$(libmutterinclude_base_headers) ) >> xgen-teth && \
(cmp xgen-teth mutter-enum-types.h || cp xgen-teth mutter-enum-types.h) && \
(cmp -s xgen-teth mutter-enum-types.h || cp xgen-teth mutter-enum-types.h) && \
rm -f xgen-teth && \
echo timestamp > $(@F)
mutter-enum-types.c: stamp-mutter-enum-types.h mutter-enum-types.c.in
( cd $(srcdir) && \
$(AM_V_GEN) ( cd $(srcdir) && \
$(GLIB_MKENUMS) \
--template $(srcdir)/mutter-enum-types.c.in \
$(libmutterinclude_base_headers) ) >> xgen-tetc && \

View File

@@ -30,6 +30,8 @@
#include <string.h>
#include <clutter/x11/clutter-x11.h>
/*
* There is only one instace of each module per the process.
*/
@@ -585,12 +587,31 @@ mutter_plugin_manager_xevent_filter (MutterPluginManager *plugin_mgr,
XEvent *xev)
{
GList *l;
gboolean have_plugin_xevent_func;
if (!plugin_mgr)
return FALSE;
l = plugin_mgr->plugins;
/* We need to make sure that clutter gets certain events, like
* ConfigureNotify on the stage window. If there is a plugin that
* provides an xevent_filter function, then it's the responsibility
* of that plugin to pass events to Clutter. Otherwise, we send the
* event directly to Clutter ourselves.
*
* What happens if there are two plugins with xevent_filter functions
* is undefined; in general, multiple competing plugins are something
* we don't support well or care much about.
*
* FIXME: Really, we should just always handle sending the event to
* clutter if a plugin doesn't report the event as handled by
* returning TRUE, but it doesn't seem worth breaking compatibility
* of the plugin interface right now to achieve this; the way it is
* now works fine in practice.
*/
have_plugin_xevent_func = FALSE;
while (l)
{
MutterPlugin *plugin = l->data;
@@ -598,6 +619,7 @@ mutter_plugin_manager_xevent_filter (MutterPluginManager *plugin_mgr,
if (klass->xevent_filter)
{
have_plugin_xevent_func = TRUE;
if (klass->xevent_filter (plugin, xev) == TRUE)
return TRUE;
}
@@ -605,5 +627,8 @@ mutter_plugin_manager_xevent_filter (MutterPluginManager *plugin_mgr,
l = l->next;
}
if (!have_plugin_xevent_func)
return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
return FALSE;
}

View File

@@ -274,7 +274,7 @@ mutter_shaped_texture_paint (ClutterActor *actor)
tex_width = cogl_texture_get_width (paint_tex);
tex_height = cogl_texture_get_height (paint_tex);
if (tex_width == 0 || tex_width == 0) /* no contents yet */
if (tex_width == 0 || tex_height == 0) /* no contents yet */
return;
if (paint_tex == COGL_INVALID_HANDLE)
@@ -419,8 +419,8 @@ mutter_shaped_texture_pick (ClutterActor *actor,
tex_width = cogl_texture_get_width (paint_tex);
tex_height = cogl_texture_get_height (paint_tex);
if (tex_width == 0 || tex_width == 0) /* no contents yet */
return;
if (tex_width == 0 || tex_height == 0) /* no contents yet */
return;
mutter_shaped_texture_ensure_mask (stex);

View File

@@ -362,6 +362,15 @@ mutter_window_constructed (GObject *object)
clutter_container_add_actor (CLUTTER_CONTAINER (self), priv->actor);
/*
* Since we are holding a pointer to this actor independently of the
* ClutterContainer internals, and provide a public API to access it,
* add a reference here, so that if someone is messing about with us
* via the container interface, we do not end up with a dangling pointer.
* We will release it in dispose().
*/
g_object_ref (priv->actor);
g_signal_connect (priv->window, "notify::decorated",
G_CALLBACK (mutter_meta_window_decorated_notify), self);
}
@@ -415,7 +424,11 @@ mutter_window_dispose (GObject *object)
info->windows = g_list_remove (info->windows, (gconstpointer) self);
g_hash_table_remove (info->windows_by_xid, (gpointer) priv->xwindow);
g_free (priv->desc);
/*
* Release the extra reference we took on the actor.
*/
g_object_unref (priv->actor);
priv->actor = NULL;
G_OBJECT_CLASS (mutter_window_parent_class)->dispose (object);
}
@@ -423,6 +436,11 @@ mutter_window_dispose (GObject *object)
static void
mutter_window_finalize (GObject *object)
{
MutterWindow *self = MUTTER_WINDOW (object);
MutterWindowPrivate *priv = self->priv;
g_free (priv->desc);
G_OBJECT_CLASS (mutter_window_parent_class)->finalize (object);
}
@@ -768,7 +786,7 @@ mutter_window_mark_for_repair (MutterWindow *self)
*
* The compositor paint function repairs all windows.
*/
clutter_actor_queue_redraw (CLUTTER_ACTOR (self));
clutter_actor_queue_redraw (priv->actor);
}
static gboolean
@@ -833,7 +851,7 @@ mutter_window_after_effects (MutterWindow *self)
mutter_window_detach (self);
if (priv->needs_repair)
clutter_actor_queue_redraw (CLUTTER_ACTOR (self));
clutter_actor_queue_redraw (priv->actor);
}
void
@@ -1512,8 +1530,6 @@ check_needs_repair (MutterWindow *self)
"pixmap-height", &pxm_height,
NULL);
clutter_actor_set_size (priv->actor, pxm_width, pxm_height);
if (priv->shadow)
clutter_actor_set_size (priv->shadow, pxm_width, pxm_height);
@@ -1654,7 +1670,7 @@ mutter_window_update_shape (MutterWindow *self,
priv->shaped = shaped;
priv->needs_reshape = TRUE;
clutter_actor_queue_redraw (CLUTTER_ACTOR (self));
clutter_actor_queue_redraw (priv->actor);
}
void

View File

@@ -700,8 +700,17 @@ get_size_limits (const MetaWindow *window,
min_size->width += fw;
min_size->height += fh;
max_size->width += fw;
max_size->height += fh;
/* Do check to avoid overflow (e.g. max_size->width & max_size->height
* may be set to G_MAXINT by meta_set_normal_hints()).
*/
if (max_size->width < (G_MAXINT - fw))
max_size->width += fw;
else
max_size->width = G_MAXINT;
if (max_size->height < (G_MAXINT - fh))
max_size->height += fh;
else
max_size->height = G_MAXINT;
}
}

View File

@@ -128,9 +128,16 @@ G_DEFINE_TYPE(MetaDisplay, meta_display, G_TYPE_OBJECT);
enum
{
OVERLAY_KEY,
FOCUS_WINDOW,
LAST_SIGNAL
};
enum {
PROP_0,
PROP_FOCUS_WINDOW
};
static guint display_signals [LAST_SIGNAL] = { 0 };
/**
@@ -169,9 +176,47 @@ static void sanity_check_timestamps (MetaDisplay *display,
MetaGroup* get_focussed_group (MetaDisplay *display);
static void
meta_display_get_property(GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
MetaDisplay *display = META_DISPLAY (object);
switch (prop_id)
{
case PROP_FOCUS_WINDOW:
g_value_set_object (value, display->focus_window);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
meta_display_set_property(GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
switch (prop_id)
{
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
meta_display_class_init (MetaDisplayClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->get_property = meta_display_get_property;
object_class->set_property = meta_display_set_property;
display_signals[OVERLAY_KEY] =
g_signal_new ("overlay-key",
G_TYPE_FROM_CLASS (klass),
@@ -179,9 +224,18 @@ meta_display_class_init (MetaDisplayClass *klass)
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
G_TYPE_NONE, 0);
g_object_class_install_property (object_class,
PROP_FOCUS_WINDOW,
g_param_spec_object ("focus-window",
"Focus window",
"Currently focused window",
META_TYPE_WINDOW,
G_PARAM_READABLE));
}
/**
* Destructor for MetaPingData structs. Will destroy the
* event source for the struct as well.
@@ -1618,14 +1672,8 @@ event_callback (XEvent *event,
case ButtonPress:
if (event->xbutton.button == 4 || event->xbutton.button == 5)
{
if (display->compositor && window)
{
return meta_compositor_process_event (display->compositor,
event,
window);
}
else
return FALSE;
/* Scrollwheel event, do nothing and deliver event to compositor below
*/
}
else if ((window &&
grab_op_is_mouse (display->grab_op) &&

View File

@@ -844,7 +844,7 @@ cache_edges (MetaDisplay *display,
* 2nd: Allocate the edges
*/
g_assert (display->grab_edge_resistance_data == NULL);
display->grab_edge_resistance_data = g_new (MetaEdgeResistanceData, 1);
display->grab_edge_resistance_data = g_new0 (MetaEdgeResistanceData, 1);
edge_data = display->grab_edge_resistance_data;
edge_data->left_edges = g_array_sized_new (FALSE,
FALSE,

View File

@@ -85,6 +85,7 @@ enum
WORKSPACE_ADDED,
WORKSPACE_REMOVED,
WORKSPACE_SWITCHED,
STARTUP_SEQUENCE_CHANGED,
LAST_SIGNAL
};
@@ -199,6 +200,15 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_INT,
MUTTER_TYPE_MOTION_DIRECTION);
screen_signals[STARTUP_SEQUENCE_CHANGED] =
g_signal_new ("startup-sequence-changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
screen_signals[TOGGLE_RECORDING] =
g_signal_new ("toggle-recording",
G_TYPE_FROM_CLASS (klass),
@@ -2662,9 +2672,9 @@ add_sequence (MetaScreen *screen,
* to compute exactly when we may next time out
*/
if (screen->startup_sequence_timeout == 0)
screen->startup_sequence_timeout = g_timeout_add (1000,
startup_sequence_timeout,
screen);
screen->startup_sequence_timeout = g_timeout_add_seconds (1,
startup_sequence_timeout,
screen);
update_startup_feedback (screen);
}
@@ -2679,8 +2689,7 @@ remove_sequence (MetaScreen *screen,
screen->startup_sequences = g_slist_remove (screen->startup_sequences,
sequence);
sn_startup_sequence_unref (sequence);
if (screen->startup_sequences == NULL &&
screen->startup_sequence_timeout != 0)
{
@@ -2689,6 +2698,8 @@ remove_sequence (MetaScreen *screen,
}
update_startup_feedback (screen);
sn_startup_sequence_unref (sequence);
}
typedef struct
@@ -2779,7 +2790,9 @@ meta_screen_sn_event (SnMonitorEvent *event,
screen = user_data;
sequence = sn_monitor_event_get_startup_sequence (event);
sn_startup_sequence_ref (sequence);
switch (sn_monitor_event_get_type (event))
{
case SN_MONITOR_EVENT_INITIATED:
@@ -2818,6 +2831,22 @@ meta_screen_sn_event (SnMonitorEvent *event,
sn_startup_sequence_get_id (sequence));
break;
}
g_signal_emit (G_OBJECT (screen), screen_signals[STARTUP_SEQUENCE_CHANGED], 0, sequence);
sn_startup_sequence_unref (sequence);
}
/**
* meta_screen_get_startup_sequences:
* @screen:
*
* Return value: (transfer none): Currently active #SnStartupSequence items
*/
GSList *
meta_screen_get_startup_sequences (MetaScreen *screen)
{
return screen->startup_sequences;
}
#endif

View File

@@ -574,8 +574,6 @@ void meta_window_free_delete_dialog (MetaWindow *window);
void meta_window_foreach_transient (MetaWindow *window,
MetaWindowForeachFunc func,
void *data);
gboolean meta_window_is_ancestor_of_transient (MetaWindow *window,
MetaWindow *transient);
void meta_window_foreach_ancestor (MetaWindow *window,
MetaWindowForeachFunc func,
void *data);

View File

@@ -42,6 +42,7 @@
#include "group.h"
#include "window-props.h"
#include "constraints.h"
#include "mutter-enum-types.h"
#include <X11/Xatom.h>
#include <string.h>
@@ -135,6 +136,7 @@ enum {
PROP_MINI_ICON,
PROP_DECORATED,
PROP_FULLSCREEN,
PROP_WINDOW_TYPE
};
enum
@@ -197,6 +199,9 @@ meta_window_get_property(GObject *object,
case PROP_FULLSCREEN:
g_value_set_boolean (value, win->fullscreen);
break;
case PROP_WINDOW_TYPE:
g_value_set_enum (value, win->type);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -266,6 +271,15 @@ meta_window_class_init (MetaWindowClass *klass)
FALSE,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_WINDOW_TYPE,
g_param_spec_enum ("window-type",
"Window Type",
"The type of the window",
MUTTER_TYPE_WINDOW_TYPE,
META_WINDOW_NORMAL,
G_PARAM_READABLE));
window_signals[WORKSPACE_CHANGED] =
g_signal_new ("workspace-changed",
G_TYPE_FROM_CLASS (object_class),
@@ -762,6 +776,16 @@ meta_window_new_with_attrs (MetaDisplay *display,
window->compositor_private = NULL;
if (window->override_redirect)
{
window->decorated = FALSE;
window->always_sticky = TRUE;
window->has_close_func = FALSE;
window->has_shade_func = FALSE;
window->has_move_func = FALSE;
window->has_resize_func = FALSE;
}
meta_display_register_x_window (display, &window->xwindow, window);
@@ -1279,7 +1303,10 @@ meta_window_unmanage (MetaWindow *window,
g_assert (window->display->grab_window != window);
if (window->display->focus_window == window)
window->display->focus_window = NULL;
{
window->display->focus_window = NULL;
g_object_notify (G_OBJECT (window->display), "focus-window");
}
if (window->maximized_horizontally || window->maximized_vertically)
unmaximize_window_before_freeing (window);
@@ -2015,13 +2042,22 @@ intervening_user_event_occurred (MetaWindow *window)
/* To determine the "launch" time of an application,
* startup-notification can set the TIMESTAMP and the
* application (usually via its toolkit such as gtk or qt) can
* set the _NET_WM_USER_TIME. If both are set, then it means
* the user has interacted with the application since it
* launched, and _NET_WM_USER_TIME is the value that should be
* used in the comparison.
* set the _NET_WM_USER_TIME. If both are set, we need to be
* using the newer of the two values.
*
* See http://bugzilla.gnome.org/show_bug.cgi?id=573922
*/
compare = window->initial_timestamp_set ? window->initial_timestamp : 0;
compare = window->net_wm_user_time_set ? window->net_wm_user_time : compare;
compare = 0;
if (window->net_wm_user_time_set &&
window->initial_timestamp_set)
compare =
XSERVER_TIME_IS_BEFORE (window->net_wm_user_time,
window->initial_timestamp) ?
window->initial_timestamp : window->net_wm_user_time;
else if (window->net_wm_user_time_set)
compare = window->net_wm_user_time;
else if (window->initial_timestamp_set)
compare = window->initial_timestamp;
if ((focus_window != NULL) &&
XSERVER_TIME_IS_BEFORE (compare, focus_window->net_wm_user_time))
@@ -2557,6 +2593,15 @@ meta_window_show (MetaWindow *window)
window->desc);
invalidate_work_areas (window);
}
/*
* Now that we have shown the window, we no longer want to consider the
* initial timestamp in any subsequent deliberations whether to focus this
* window or not, so clear the flag.
*
* See http://bugzilla.gnome.org/show_bug.cgi?id=573922
*/
window->initial_timestamp_set = FALSE;
}
static void
@@ -5674,6 +5719,13 @@ meta_window_notify_focus (MetaWindow *window,
if (event->type == FocusIn)
{
if (window->override_redirect)
{
window->display->focus_window = NULL;
g_object_notify (G_OBJECT (window->display), "focus-window");
return FALSE;
}
if (window != window->display->focus_window)
{
meta_topic (META_DEBUG_FOCUS,
@@ -5737,7 +5789,7 @@ meta_window_notify_focus (MetaWindow *window,
meta_display_ungrab_focus_window_button (window->display, window);
g_signal_emit (window, window_signals[FOCUS], 0);
g_object_notify (G_OBJECT (window->display), "focus-window");
}
}
else if (event->type == FocusOut ||
@@ -5763,6 +5815,7 @@ meta_window_notify_focus (MetaWindow *window,
"* Focus --> NULL (was %s)\n", window->desc);
window->display->focus_window = NULL;
g_object_notify (G_OBJECT (window->display), "focus-window");
window->has_focus = FALSE;
if (window->frame)
meta_frame_queue_draw (window->frame);
@@ -6413,24 +6466,7 @@ recalc_window_type (MetaWindow *window)
old_type = window->type;
if (window->override_redirect)
{
if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_DROPDOWN_MENU)
window->type = META_WINDOW_DROPDOWN_MENU;
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_POPUP_MENU)
window->type = META_WINDOW_POPUP_MENU;
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_TOOLTIP)
window->type = META_WINDOW_TOOLTIP;
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_NOTIFICATION)
window->type = META_WINDOW_NOTIFICATION;
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_COMBO)
window->type = META_WINDOW_COMBO;
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_DND)
window->type = META_WINDOW_DND;
else
window->type = META_WINDOW_OVERRIDE_OTHER;
}
else if (window->type_atom != None)
if (window->type_atom != None)
{
if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_DESKTOP)
window->type = META_WINDOW_DESKTOP;
@@ -6448,9 +6484,42 @@ recalc_window_type (MetaWindow *window)
window->type = META_WINDOW_DIALOG;
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_NORMAL)
window->type = META_WINDOW_NORMAL;
/* The below are *typically* override-redirect windows, but the spec does
* not disallow using them for managed windows.
*/
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_DROPDOWN_MENU)
window->type = META_WINDOW_DROPDOWN_MENU;
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_POPUP_MENU)
window->type = META_WINDOW_POPUP_MENU;
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_TOOLTIP)
window->type = META_WINDOW_TOOLTIP;
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_NOTIFICATION)
window->type = META_WINDOW_NOTIFICATION;
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_COMBO)
window->type = META_WINDOW_COMBO;
else if (window->type_atom == window->display->atom__NET_WM_WINDOW_TYPE_DND)
window->type = META_WINDOW_DND;
else
meta_bug ("Set a type atom for %s that wasn't handled in recalc_window_type\n",
window->desc);
{
char *atom_name;
/*
* Fallback on a normal type, and print warning. Don't abort.
*/
window->type = META_WINDOW_NORMAL;
meta_error_trap_push (window->display);
atom_name = XGetAtomName (window->display->xdisplay,
window->type_atom);
meta_error_trap_pop (window->display, TRUE);
meta_warning ("Unrecognized type atom [%s] set for %s \n",
atom_name ? atom_name : "unknown",
window->desc);
if (atom_name)
XFree (atom_name);
}
}
else if (window->xtransient_for != None)
{
@@ -6465,12 +6534,46 @@ recalc_window_type (MetaWindow *window)
window->wm_state_modal)
window->type = META_WINDOW_MODAL_DIALOG;
/* We don't want to allow override-redirect windows to have decorated-window
* types since that's just confusing.
*/
if (window->override_redirect)
{
switch (window->type)
{
/* Decorated types */
case META_WINDOW_NORMAL:
case META_WINDOW_DIALOG:
case META_WINDOW_MODAL_DIALOG:
case META_WINDOW_MENU:
case META_WINDOW_UTILITY:
window->type = META_WINDOW_OVERRIDE_OTHER;
break;
/* Undecorated types, normally not override-redirect */
case META_WINDOW_DESKTOP:
case META_WINDOW_DOCK:
case META_WINDOW_TOOLBAR:
case META_WINDOW_SPLASHSCREEN:
/* Undecorated types, normally override-redirect types */
case META_WINDOW_DROPDOWN_MENU:
case META_WINDOW_POPUP_MENU:
case META_WINDOW_TOOLTIP:
case META_WINDOW_NOTIFICATION:
case META_WINDOW_COMBO:
case META_WINDOW_DND:
/* To complete enum */
case META_WINDOW_OVERRIDE_OTHER:
break;
}
}
meta_verbose ("Calculated type %u for %s, old type %u\n",
window->type, window->desc, old_type);
if (old_type != window->type)
{
gboolean old_decorated = window->decorated;
GObject *object = G_OBJECT (window);
recalc_window_features (window);
@@ -6488,8 +6591,14 @@ recalc_window_type (MetaWindow *window)
meta_window_grab_keys (window);
g_object_freeze_notify (object);
if (old_decorated != window->decorated)
g_object_notify (G_OBJECT (window), "decorated");
g_object_notify (object, "decorated");
g_object_notify (object, "window-type");
g_object_thaw_notify (object);
}
}
@@ -8061,6 +8170,17 @@ find_ancestor_func (MetaWindow *window,
return TRUE;
}
/**
* meta_window_is_ancestor_of_transient:
* @window: a #MetaWindow
* @transient: a #MetaWindow
*
* The function determines whether @window is an ancestor of @transient; it does
* so by traversing the @transient's ancestors until it either locates @window
* or reaches an ancestor that is not transient.
*
* Return Value: (transfer none): %TRUE if window is an ancestor of transient.
*/
gboolean
meta_window_is_ancestor_of_transient (MetaWindow *window,
MetaWindow *transient)
@@ -8636,3 +8756,40 @@ meta_window_get_transient_for (MetaWindow *window)
else
return NULL;
}
/**
* meta_window_get_pid:
* @window: a #MetaWindow
*
* Returns pid of the process that created this window, if known (obtained from
* the _NET_WM_PID property).
*
* Return value: (transfer none): the pid, or -1 if not known.
*/
int
meta_window_get_pid (MetaWindow *window)
{
g_return_val_if_fail (META_IS_WINDOW (window), -1);
return window->net_wm_pid;
}
/**
* meta_window_get_client_machine:
* @window: a #MetaWindow
*
* Returns name of the client machine from which this windows was created,
* if known (obtained from the WM_CLIENT_MACHINE property).
*
* Return value: (transfer none): the machine name, or NULL; the string is
* owned by the window manager and should not be freed or modified by the
* caller.
*/
const char *
meta_window_get_client_machine (MetaWindow *window)
{
g_return_val_if_fail (META_IS_WINDOW (window), NULL);
return window->wm_client_machine;
}

View File

@@ -55,6 +55,8 @@ MetaScreen *meta_screen_for_x_screen (Screen *xscreen);
void meta_screen_set_cm_selection (MetaScreen *screen);
void meta_screen_unset_cm_selection (MetaScreen *screen);
GSList *meta_screen_get_startup_sequences (MetaScreen *screen);
GList *meta_screen_get_workspaces (MetaScreen *screen);
int meta_screen_get_n_workspaces (MetaScreen *screen);

View File

@@ -134,11 +134,11 @@ GPid meta_show_dialog (const char *type,
#include <glib-object.h>
#define META_TYPE_NEXUS (meta_nexus_get_type ())
#define META_NEXUS(obj) (GTK_CHECK_CAST ((obj), META_TYPE_NEXUS, MetaNexus))
#define META_NEXUS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_NEXUS, MetaNexusClass))
#define META_IS_NEXUS(obj) (GTK_CHECK_TYPE ((obj), META_TYPE_NEXUS))
#define META_IS_NEXUS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_NEXUS))
#define META_NEXUS_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), META_TYPE_NEXUS, MetaNexusClass))
#define META_NEXUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_NEXUS, MetaNexus))
#define META_NEXUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_NEXUS, MetaNexusClass))
#define META_IS_NEXUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_NEXUS))
#define META_IS_NEXUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_NEXUS))
#define META_NEXUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_NEXUS, MetaNexusClass))
typedef struct _MetaNexus
{

View File

@@ -100,6 +100,8 @@ void meta_window_configure_notify (MetaWindow *window, XConfigureEvent *event);
const char *meta_window_get_role (MetaWindow *window);
MetaStackLayer meta_window_get_layer (MetaWindow *window);
MetaWindow* meta_window_find_root_ancestor (MetaWindow *window);
gboolean meta_window_is_ancestor_of_transient (MetaWindow *window,
MetaWindow *transient);
gboolean meta_window_get_icon_geometry (MetaWindow *window,
MetaRectangle *rect);
void meta_window_maximize (MetaWindow *window,
@@ -112,5 +114,6 @@ const char *meta_window_get_title (MetaWindow *window);
MetaWindow *meta_window_get_transient_for (MetaWindow *window);
void meta_window_delete (MetaWindow *window,
guint32 timestamp);
int meta_window_get_pid (MetaWindow *window);
const char *meta_window_get_client_machine (MetaWindow *window);
#endif

View File

@@ -171,10 +171,8 @@ mouse_release (GtkWidget *invisible,
shutdown_grab ();
gtk_signal_disconnect_by_func (GTK_OBJECT (invisible),
GTK_SIGNAL_FUNC (mouse_motion), NULL);
gtk_signal_disconnect_by_func (GTK_OBJECT (invisible),
GTK_SIGNAL_FUNC (mouse_release), NULL);
g_signal_handlers_disconnect_by_func (invisible, mouse_motion, NULL);
g_signal_handlers_disconnect_by_func (invisible, mouse_release, NULL);
return TRUE;
}
@@ -194,12 +192,8 @@ key_press (GtkWidget *invisible,
{
shutdown_grab ();
gtk_signal_disconnect_by_func (GTK_OBJECT (invisible),
GTK_SIGNAL_FUNC (mouse_press),
NULL);
gtk_signal_disconnect_by_func (GTK_OBJECT (invisible),
GTK_SIGNAL_FUNC (key_press),
NULL);
g_signal_handlers_disconnect_by_func (invisible, mouse_press, NULL);
g_signal_handlers_disconnect_by_func (invisible, key_press, NULL);
return TRUE;
}
@@ -219,12 +213,8 @@ mouse_press (GtkWidget *invisible,
G_CALLBACK (mouse_motion), NULL);
g_signal_connect (invisible, "button_release_event",
G_CALLBACK (mouse_release), NULL);
gtk_signal_disconnect_by_func (GTK_OBJECT (invisible),
GTK_SIGNAL_FUNC (mouse_press),
NULL);
gtk_signal_disconnect_by_func (GTK_OBJECT (invisible),
GTK_SIGNAL_FUNC (key_press),
NULL);
g_signal_handlers_disconnect_by_func (invisible, mouse_press, NULL);
g_signal_handlers_disconnect_by_func (invisible, key_press, NULL);
return TRUE;
}

View File

@@ -853,8 +853,7 @@ do_appwindow (void)
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group);
/* Set up item factory to go away with the window */
g_object_ref (item_factory);
gtk_object_sink (GTK_OBJECT (item_factory));
g_object_ref_sink (item_factory);
g_object_set_data_full (G_OBJECT (window),
"<main>",
item_factory,

View File

@@ -87,7 +87,7 @@ meta_fixed_tip_show (Display *xdisplay, int screen_number,
}
gtk_widget_set_app_paintable (tip, TRUE);
gtk_window_set_policy (GTK_WINDOW (tip), FALSE, FALSE, TRUE);
gtk_window_set_resizable (GTK_WINDOW (tip), FALSE);
gtk_widget_set_name (tip, "gtk-tooltips");
gtk_container_set_border_width (GTK_CONTAINER (tip), 4);

View File

@@ -108,10 +108,10 @@ static void invalidate_whole_window (MetaFrames *frames,
static GtkWidgetClass *parent_class = NULL;
GtkType
GType
meta_frames_get_type (void)
{
static GtkType frames_type = 0;
static GType frames_type = 0;
if (!frames_type)
{
@@ -593,7 +593,7 @@ meta_frames_attach_style (MetaFrames *frames,
gtk_style_detach (frame->style);
/* Weirdly, gtk_style_attach() steals a reference count from the style passed in */
gtk_style_ref (GTK_WIDGET (frames)->style);
g_object_ref (GTK_WIDGET (frames)->style);
frame->style = gtk_style_attach (GTK_WIDGET (frames)->style, frame->window);
}

View File

@@ -60,11 +60,11 @@ typedef enum
*/
#define META_TYPE_FRAMES (meta_frames_get_type ())
#define META_FRAMES(obj) (GTK_CHECK_CAST ((obj), META_TYPE_FRAMES, MetaFrames))
#define META_FRAMES_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_FRAMES, MetaFramesClass))
#define META_IS_FRAMES(obj) (GTK_CHECK_TYPE ((obj), META_TYPE_FRAMES))
#define META_IS_FRAMES_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_FRAMES))
#define META_FRAMES_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), META_TYPE_FRAMES, MetaFramesClass))
#define META_FRAMES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_FRAMES, MetaFrames))
#define META_FRAMES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_FRAMES, MetaFramesClass))
#define META_IS_FRAMES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_FRAMES))
#define META_IS_FRAMES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_FRAMES))
#define META_FRAMES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_FRAMES, MetaFramesClass))
typedef struct _MetaFrames MetaFrames;
typedef struct _MetaFramesClass MetaFramesClass;

View File

@@ -445,7 +445,7 @@ meta_window_menu_new (MetaFrames *frames,
gtk_signal_connect_full (GTK_OBJECT (submi),
"activate",
GTK_SIGNAL_FUNC (activate_cb),
G_CALLBACK (activate_cb),
NULL,
md,
g_free, FALSE, FALSE);

View File

@@ -53,10 +53,10 @@ static int meta_accel_label_get_accel_width (MetaAccelLabel *accel_label);
static GtkLabelClass *parent_class = NULL;
GtkType
GType
meta_accel_label_get_type (void)
{
static GtkType accel_label_type = 0;
static GType accel_label_type = 0;
if (!accel_label_type)
{

View File

@@ -43,11 +43,11 @@ extern "C" {
#define META_TYPE_ACCEL_LABEL (meta_accel_label_get_type ())
#define META_ACCEL_LABEL(obj) (GTK_CHECK_CAST ((obj), META_TYPE_ACCEL_LABEL, MetaAccelLabel))
#define META_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_ACCEL_LABEL, MetaAccelLabelClass))
#define META_IS_ACCEL_LABEL(obj) (GTK_CHECK_TYPE ((obj), META_TYPE_ACCEL_LABEL))
#define META_IS_ACCEL_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_ACCEL_LABEL))
#define META_ACCEL_LABEL_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), META_TYPE_ACCEL_LABEL, MetaAccelLabelClass))
#define META_ACCEL_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_ACCEL_LABEL, MetaAccelLabel))
#define META_ACCEL_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_ACCEL_LABEL, MetaAccelLabelClass))
#define META_IS_ACCEL_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_ACCEL_LABEL))
#define META_IS_ACCEL_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_ACCEL_LABEL))
#define META_ACCEL_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_ACCEL_LABEL, MetaAccelLabelClass))
typedef struct _MetaAccelLabel MetaAccelLabel;
@@ -91,7 +91,7 @@ struct _MetaAccelLabelClass
void (*_gtk_reserved4) (void);
};
GtkType meta_accel_label_get_type (void) G_GNUC_CONST;
GType meta_accel_label_get_type (void) G_GNUC_CONST;
GtkWidget* meta_accel_label_new_with_mnemonic (const gchar *string);
void meta_accel_label_set_accelerator (MetaAccelLabel *accel_label,
guint accelerator_key,

View File

@@ -40,10 +40,10 @@ static void meta_preview_finalize (GObject *object);
static GtkWidgetClass *parent_class;
GtkType
GType
meta_preview_get_type (void)
{
static GtkType preview_type = 0;
static GType preview_type = 0;
if (!preview_type)
{

View File

@@ -28,11 +28,11 @@
#define META_PREVIEW_WIDGET_H
#define META_TYPE_PREVIEW (meta_preview_get_type ())
#define META_PREVIEW(obj) (GTK_CHECK_CAST ((obj), META_TYPE_PREVIEW, MetaPreview))
#define META_PREVIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_PREVIEW, MetaPreviewClass))
#define META_IS_PREVIEW(obj) (GTK_CHECK_TYPE ((obj), META_TYPE_PREVIEW))
#define META_IS_PREVIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_PREVIEW))
#define META_PREVIEW_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), META_TYPE_PREVIEW, MetaPreviewClass))
#define META_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_PREVIEW, MetaPreview))
#define META_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_PREVIEW, MetaPreviewClass))
#define META_IS_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_PREVIEW))
#define META_IS_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_PREVIEW))
#define META_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_PREVIEW, MetaPreviewClass))
typedef struct _MetaPreview MetaPreview;
typedef struct _MetaPreviewClass MetaPreviewClass;
@@ -63,7 +63,7 @@ struct _MetaPreviewClass
};
GtkType meta_preview_get_type (void) G_GNUC_CONST;
GType meta_preview_get_type (void) G_GNUC_CONST;
GtkWidget* meta_preview_new (void);
void meta_preview_set_theme (MetaPreview *preview,

View File

@@ -597,7 +597,7 @@ meta_ui_tab_popup_select (MetaTabPopup *popup,
}
#define META_TYPE_SELECT_IMAGE (meta_select_image_get_type ())
#define META_SELECT_IMAGE(obj) (GTK_CHECK_CAST ((obj), META_TYPE_SELECT_IMAGE, MetaSelectImage))
#define META_SELECT_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_SELECT_IMAGE, MetaSelectImage))
typedef struct _MetaSelectImage MetaSelectImage;
typedef struct _MetaSelectImageClass MetaSelectImageClass;
@@ -650,7 +650,7 @@ static GtkImageClass *parent_class;
GType
meta_select_image_get_type (void)
{
static GtkType image_type = 0;
static GType image_type = 0;
if (!image_type)
{
@@ -678,7 +678,7 @@ meta_select_image_class_init (MetaSelectImageClass *klass)
{
GtkWidgetClass *widget_class;
parent_class = gtk_type_class (gtk_image_get_type ());
parent_class = g_type_class_peek (gtk_image_get_type ());
widget_class = GTK_WIDGET_CLASS (klass);
@@ -737,7 +737,7 @@ meta_select_image_expose_event (GtkWidget *widget,
}
#define META_TYPE_SELECT_WORKSPACE (meta_select_workspace_get_type ())
#define META_SELECT_WORKSPACE(obj) (GTK_CHECK_CAST ((obj), META_TYPE_SELECT_WORKSPACE, MetaSelectWorkspace))
#define META_SELECT_WORKSPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_SELECT_WORKSPACE, MetaSelectWorkspace))
typedef struct _MetaSelectWorkspace MetaSelectWorkspace;
typedef struct _MetaSelectWorkspaceClass MetaSelectWorkspaceClass;
@@ -803,7 +803,7 @@ static gboolean meta_select_workspace_expose_event (GtkWidget *widget,
GType
meta_select_workspace_get_type (void)
{
static GtkType workspace_type = 0;
static GType workspace_type = 0;
if (!workspace_type)
{

View File

@@ -109,7 +109,8 @@ normal_contents (void)
/* Set up item factory to go away */
g_object_ref (item_factory);
gtk_object_sink (GTK_OBJECT (item_factory));
g_object_ref_sink (item_factory);
g_object_unref (item_factory);
g_object_set_data_full (G_OBJECT (table),
"<main>",
item_factory,

View File

@@ -35,10 +35,10 @@ static void meta_area_finalize (GObject *object);
static GtkMiscClass *parent_class;
GtkType
GType
meta_area_get_type (void)
{
static GtkType area_type = 0;
static GType area_type = 0;
if (!area_type)
{

View File

@@ -28,11 +28,11 @@
#define META_THEME_WIDGET_H
#define META_TYPE_AREA (meta_area_get_type ())
#define META_AREA(obj) (GTK_CHECK_CAST ((obj), META_TYPE_AREA, MetaArea))
#define META_AREA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), META_TYPE_AREA, MetaAreaClass))
#define META_IS_AREA(obj) (GTK_CHECK_TYPE ((obj), META_TYPE_AREA))
#define META_IS_AREA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), META_TYPE_AREA))
#define META_AREA_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), META_TYPE_AREA, MetaAreaClass))
#define META_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_AREA, MetaArea))
#define META_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_AREA, MetaAreaClass))
#define META_IS_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_AREA))
#define META_IS_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_AREA))
#define META_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_AREA, MetaAreaClass))
typedef struct _MetaArea MetaArea;
typedef struct _MetaAreaClass MetaAreaClass;
@@ -65,7 +65,7 @@ struct _MetaAreaClass
};
GtkType meta_area_get_type (void) G_GNUC_CONST;
GType meta_area_get_type (void) G_GNUC_CONST;
GtkWidget* meta_area_new (void);
void meta_area_setup (MetaArea *area,

View File

@@ -58,7 +58,7 @@ gtk_widget_get_type (void)
/* dummy */
}
GtkType
GType
gtk_object_get_type (void)
{
/* dummy */