mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
Added MetaWindow::fullscreen property (read only).
This commit is contained in:
parent
4203fd2993
commit
cd0ef08783
@ -583,7 +583,13 @@ reload_net_wm_state (MetaWindow *window,
|
||||
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_SKIP_PAGER)
|
||||
window->wm_state_skip_pager = TRUE;
|
||||
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_FULLSCREEN)
|
||||
window->fullscreen = TRUE;
|
||||
{
|
||||
if (!window->fullscreen)
|
||||
{
|
||||
window->fullscreen = TRUE;
|
||||
g_object_notify (G_OBJECT (window), "fullscreen");
|
||||
}
|
||||
}
|
||||
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_ABOVE)
|
||||
window->wm_state_above = TRUE;
|
||||
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_BELOW)
|
||||
|
@ -139,6 +139,7 @@ enum {
|
||||
PROP_ICON,
|
||||
PROP_MINI_ICON,
|
||||
PROP_DECORATED,
|
||||
PROP_FULLSCREEN,
|
||||
};
|
||||
|
||||
enum
|
||||
@ -198,6 +199,9 @@ meta_window_get_property(GObject *object,
|
||||
case PROP_DECORATED:
|
||||
g_value_set_boolean (value, win->decorated);
|
||||
break;
|
||||
case PROP_FULLSCREEN:
|
||||
g_value_set_boolean (value, win->fullscreen);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@ -259,6 +263,14 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
TRUE,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_FULLSCREEN,
|
||||
g_param_spec_boolean ("fullscreen",
|
||||
"Fullscreen",
|
||||
"Whether windos is fullscreened",
|
||||
FALSE,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
window_signals[WORKSPACE_CHANGED] =
|
||||
g_signal_new ("workspace-changed",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
@ -3086,6 +3098,8 @@ meta_window_make_fullscreen_internal (MetaWindow *window)
|
||||
|
||||
recalc_window_features (window);
|
||||
set_net_wm_state (window);
|
||||
|
||||
g_object_notify (G_OBJECT (window), "fullscreen");
|
||||
}
|
||||
}
|
||||
|
||||
@ -3130,6 +3144,8 @@ meta_window_unmake_fullscreen (MetaWindow *window)
|
||||
|
||||
recalc_window_features (window);
|
||||
set_net_wm_state (window);
|
||||
|
||||
g_object_notify (G_OBJECT (window), "fullscreen");
|
||||
}
|
||||
}
|
||||
|
||||
@ -3270,10 +3286,10 @@ window_activate (MetaWindow *window,
|
||||
if (workspace == NULL)
|
||||
workspace = window->screen->active_workspace;
|
||||
|
||||
/* For non-transient windows, we just set up a pulsing indicator,
|
||||
/* For non-transient windows, we just set up a pulsing indicator,
|
||||
rather than move windows or workspaces.
|
||||
See http://bugzilla.gnome.org/show_bug.cgi?id=482354 */
|
||||
if (window->xtransient_for == None &&
|
||||
if (window->xtransient_for == None &&
|
||||
!meta_window_located_on_workspace (window, workspace))
|
||||
{
|
||||
meta_window_set_demands_attention (window);
|
||||
@ -3282,7 +3298,7 @@ window_activate (MetaWindow *window,
|
||||
}
|
||||
else if (window->xtransient_for != None)
|
||||
{
|
||||
/* Move transients to current workspace - preference dialogs should appear over
|
||||
/* Move transients to current workspace - preference dialogs should appear over
|
||||
the source window. */
|
||||
meta_window_change_workspace (window, workspace);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user