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:
Havoc Pennington 2001-08-20 03:17:40 +00:00 committed by Havoc Pennington
parent 04e09d4c56
commit f562e65d5f
5 changed files with 48 additions and 14 deletions

View File

@ -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>
* src/screen.c (set_supported_hint): we support _NET_WM_ICON

View File

@ -262,6 +262,10 @@ compute_layer (MetaWindow *window)
window->layer = META_LAYER_DOCK;
break;
case META_WINDOW_FULLSCREEN:
window->layer = META_LAYER_FULLSCREEN;
break;
default:
window->layer = META_LAYER_NORMAL;
break;

View File

@ -37,7 +37,8 @@ typedef enum
META_LAYER_NORMAL = 2,
META_LAYER_TOP = 3,
META_LAYER_DOCK = 4,
META_LAYER_LAST = 5
META_LAYER_FULLSCREEN = 5,
META_LAYER_LAST = 6
} MetaStackLayer;
struct _MetaStack

View File

@ -3817,6 +3817,13 @@ recalc_window_type (MetaWindow *window)
window->wm_state_modal)
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",
window->type, window->desc, old_type);
@ -3853,7 +3860,8 @@ recalc_window_features (MetaWindow *window)
/* Semantic category overrides the MWM hints */
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->has_close_func = FALSE;
@ -3910,8 +3918,19 @@ constrain_size (MetaWindow *window,
#define FLOOR(value, base) ( ((int) ((value) / (base))) * (base) )
/* 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;
fullh = window->screen->active_workspace->workarea.height;
}
if (window->frame)
{
fullw -= fgeom->left_width + fgeom->right_width;

View File

@ -36,7 +36,8 @@ typedef enum
META_WINDOW_DIALOG,
META_WINDOW_MODAL_DIALOG,
META_WINDOW_TOOLBAR,
META_WINDOW_MENU
META_WINDOW_MENU,
META_WINDOW_FULLSCREEN
} MetaWindowType;
struct _MetaWindow