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)
|
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_SKIP_PAGER)
|
||||||
window->wm_state_skip_pager = TRUE;
|
window->wm_state_skip_pager = TRUE;
|
||||||
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_FULLSCREEN)
|
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)
|
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_ABOVE)
|
||||||
window->wm_state_above = TRUE;
|
window->wm_state_above = TRUE;
|
||||||
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_BELOW)
|
else if (value->v.atom_list.atoms[i] == window->display->atom__NET_WM_STATE_BELOW)
|
||||||
|
@ -139,6 +139,7 @@ enum {
|
|||||||
PROP_ICON,
|
PROP_ICON,
|
||||||
PROP_MINI_ICON,
|
PROP_MINI_ICON,
|
||||||
PROP_DECORATED,
|
PROP_DECORATED,
|
||||||
|
PROP_FULLSCREEN,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -198,6 +199,9 @@ meta_window_get_property(GObject *object,
|
|||||||
case PROP_DECORATED:
|
case PROP_DECORATED:
|
||||||
g_value_set_boolean (value, win->decorated);
|
g_value_set_boolean (value, win->decorated);
|
||||||
break;
|
break;
|
||||||
|
case PROP_FULLSCREEN:
|
||||||
|
g_value_set_boolean (value, win->fullscreen);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
@ -259,6 +263,14 @@ meta_window_class_init (MetaWindowClass *klass)
|
|||||||
TRUE,
|
TRUE,
|
||||||
G_PARAM_READABLE));
|
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] =
|
window_signals[WORKSPACE_CHANGED] =
|
||||||
g_signal_new ("workspace-changed",
|
g_signal_new ("workspace-changed",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
@ -3086,6 +3098,8 @@ meta_window_make_fullscreen_internal (MetaWindow *window)
|
|||||||
|
|
||||||
recalc_window_features (window);
|
recalc_window_features (window);
|
||||||
set_net_wm_state (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);
|
recalc_window_features (window);
|
||||||
set_net_wm_state (window);
|
set_net_wm_state (window);
|
||||||
|
|
||||||
|
g_object_notify (G_OBJECT (window), "fullscreen");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user