mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
add a "fullscreen" semantic type; if a window requests the screen size
2001-08-19 Havoc Pennington <hp@pobox.com> * src/window.c: add a "fullscreen" semantic type; if a window requests the screen size exactly, and is undecorated, and is not a desktop window, we consider it a fullscreen window and keep it on top. Totally untested.
This commit is contained in:
parent
04e09d4c56
commit
f562e65d5f
@ -1,3 +1,12 @@
|
|||||||
|
2001-08-19 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* src/window.c: add a "fullscreen" semantic type; if a window
|
||||||
|
requests the screen size exactly, and is undecorated, and is not a
|
||||||
|
desktop window, we consider it a fullscreen window and keep it on
|
||||||
|
top.
|
||||||
|
|
||||||
|
Totally untested.
|
||||||
|
|
||||||
2001-08-19 Havoc Pennington <hp@pobox.com>
|
2001-08-19 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* src/screen.c (set_supported_hint): we support _NET_WM_ICON
|
* src/screen.c (set_supported_hint): we support _NET_WM_ICON
|
||||||
|
@ -262,6 +262,10 @@ compute_layer (MetaWindow *window)
|
|||||||
window->layer = META_LAYER_DOCK;
|
window->layer = META_LAYER_DOCK;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case META_WINDOW_FULLSCREEN:
|
||||||
|
window->layer = META_LAYER_FULLSCREEN;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
window->layer = META_LAYER_NORMAL;
|
window->layer = META_LAYER_NORMAL;
|
||||||
break;
|
break;
|
||||||
|
@ -37,7 +37,8 @@ typedef enum
|
|||||||
META_LAYER_NORMAL = 2,
|
META_LAYER_NORMAL = 2,
|
||||||
META_LAYER_TOP = 3,
|
META_LAYER_TOP = 3,
|
||||||
META_LAYER_DOCK = 4,
|
META_LAYER_DOCK = 4,
|
||||||
META_LAYER_LAST = 5
|
META_LAYER_FULLSCREEN = 5,
|
||||||
|
META_LAYER_LAST = 6
|
||||||
} MetaStackLayer;
|
} MetaStackLayer;
|
||||||
|
|
||||||
struct _MetaStack
|
struct _MetaStack
|
||||||
|
21
src/window.c
21
src/window.c
@ -3817,6 +3817,13 @@ recalc_window_type (MetaWindow *window)
|
|||||||
window->wm_state_modal)
|
window->wm_state_modal)
|
||||||
window->type = META_WINDOW_MODAL_DIALOG;
|
window->type = META_WINDOW_MODAL_DIALOG;
|
||||||
|
|
||||||
|
if (window->type == META_WINDOW_NORMAL &&
|
||||||
|
!window->mwm_decorated &&
|
||||||
|
(window->rect.x == 0 && window->rect.y == 0 &&
|
||||||
|
window->rect.width == window->screen->width &&
|
||||||
|
window->rect.height == window->screen->height))
|
||||||
|
window->type = META_WINDOW_FULLSCREEN;
|
||||||
|
|
||||||
meta_verbose ("Calculated type %d for %s, old type %d\n",
|
meta_verbose ("Calculated type %d for %s, old type %d\n",
|
||||||
window->type, window->desc, old_type);
|
window->type, window->desc, old_type);
|
||||||
|
|
||||||
@ -3853,7 +3860,8 @@ recalc_window_features (MetaWindow *window)
|
|||||||
/* Semantic category overrides the MWM hints */
|
/* Semantic category overrides the MWM hints */
|
||||||
|
|
||||||
if (window->type == META_WINDOW_DESKTOP ||
|
if (window->type == META_WINDOW_DESKTOP ||
|
||||||
window->type == META_WINDOW_DOCK)
|
window->type == META_WINDOW_DOCK ||
|
||||||
|
window->type == META_WINDOW_FULLSCREEN)
|
||||||
{
|
{
|
||||||
window->decorated = FALSE;
|
window->decorated = FALSE;
|
||||||
window->has_close_func = FALSE;
|
window->has_close_func = FALSE;
|
||||||
@ -3910,8 +3918,19 @@ constrain_size (MetaWindow *window,
|
|||||||
#define FLOOR(value, base) ( ((int) ((value) / (base))) * (base) )
|
#define FLOOR(value, base) ( ((int) ((value) / (base))) * (base) )
|
||||||
|
|
||||||
/* Get the allowed size ranges, considering maximized, etc. */
|
/* Get the allowed size ranges, considering maximized, etc. */
|
||||||
|
if (window->type == META_WINDOW_DESKTOP ||
|
||||||
|
window->type == META_WINDOW_DOCK ||
|
||||||
|
window->type == META_WINDOW_FULLSCREEN)
|
||||||
|
{
|
||||||
|
fullw = window->screen->width;
|
||||||
|
fullh = window->screen->height;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
fullw = window->screen->active_workspace->workarea.width;
|
fullw = window->screen->active_workspace->workarea.width;
|
||||||
fullh = window->screen->active_workspace->workarea.height;
|
fullh = window->screen->active_workspace->workarea.height;
|
||||||
|
}
|
||||||
|
|
||||||
if (window->frame)
|
if (window->frame)
|
||||||
{
|
{
|
||||||
fullw -= fgeom->left_width + fgeom->right_width;
|
fullw -= fgeom->left_width + fgeom->right_width;
|
||||||
|
@ -36,7 +36,8 @@ typedef enum
|
|||||||
META_WINDOW_DIALOG,
|
META_WINDOW_DIALOG,
|
||||||
META_WINDOW_MODAL_DIALOG,
|
META_WINDOW_MODAL_DIALOG,
|
||||||
META_WINDOW_TOOLBAR,
|
META_WINDOW_TOOLBAR,
|
||||||
META_WINDOW_MENU
|
META_WINDOW_MENU,
|
||||||
|
META_WINDOW_FULLSCREEN
|
||||||
} MetaWindowType;
|
} MetaWindowType;
|
||||||
|
|
||||||
struct _MetaWindow
|
struct _MetaWindow
|
||||||
|
Loading…
Reference in New Issue
Block a user