Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c5874e0da5 | ||
![]() |
422cd1fbbf | ||
![]() |
8a9e2877da | ||
![]() |
ff84b35e5d | ||
![]() |
ae32ac86b4 | ||
![]() |
bca3eaf709 | ||
![]() |
0f64202a29 | ||
![]() |
6b36e64e00 | ||
![]() |
84059f1faa | ||
![]() |
15376957f7 | ||
![]() |
da934be354 | ||
![]() |
3eee6b4218 | ||
![]() |
ff9400abde | ||
![]() |
e985bf0e7a | ||
![]() |
245908909b | ||
![]() |
2f63d321d1 | ||
![]() |
2222cb8fbf | ||
![]() |
897814a153 | ||
![]() |
8b7b41df41 | ||
![]() |
8f9a174f0a | ||
![]() |
df90187e06 | ||
![]() |
c9e0613b53 | ||
![]() |
a576f7a1ea | ||
![]() |
239b39cf52 | ||
![]() |
1f90529365 | ||
![]() |
acfc498344 | ||
![]() |
a1ac1f4b2e | ||
![]() |
d91d503eb2 | ||
![]() |
e84bf7144c | ||
![]() |
ec2c197e1f |
2
README
2
README
@@ -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
|
||||
===
|
||||
|
12
configure.in
12
configure.in
@@ -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)"
|
||||
|
@@ -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 && \
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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) &&
|
||||
|
@@ -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,
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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,
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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,
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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,
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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,
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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,
|
||||
|
@@ -58,7 +58,7 @@ gtk_widget_get_type (void)
|
||||
/* dummy */
|
||||
}
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_object_get_type (void)
|
||||
{
|
||||
/* dummy */
|
||||
|
Reference in New Issue
Block a user