mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 21:34:09 +00:00
Added MetaWindow::window-type property
Read-only property for querying the type of MetaWindow. http://bugzilla.gnome.org/show_bug.cgi?id=588230
This commit is contained in:
parent
8b7b41df41
commit
897814a153
@ -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),
|
||||
@ -6503,6 +6517,7 @@ recalc_window_type (MetaWindow *window)
|
||||
if (old_type != window->type)
|
||||
{
|
||||
gboolean old_decorated = window->decorated;
|
||||
GObject *object = G_OBJECT (window);
|
||||
|
||||
recalc_window_features (window);
|
||||
|
||||
@ -6520,8 +6535,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user