take a window mapped at fullscreen size/pos to desire maximization; once I

2001-10-14  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_new): take a window mapped at
	fullscreen size/pos to desire maximization; once I add a
	fullscreen state, will change to copy kwin and take this mapping
	as a desire for fullscreen, but for now testing with maximization.

	* src/window.h: remove fullscreen window type, now proposing it
	as a window state instead.

2001-10-14  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_maximize): always raise windows on
	maximize
	(meta_window_client_message): when activating a window, move
	it to current workspace, instead of moving user to the
	window's workspace.
This commit is contained in:
Havoc Pennington 2001-10-14 22:13:53 +00:00 committed by Havoc Pennington
parent bbd6396f40
commit 842eb3fa93
5 changed files with 42 additions and 38 deletions

View File

@ -1,3 +1,21 @@
2001-10-14 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_new): take a window mapped at
fullscreen size/pos to desire maximization; once I add a
fullscreen state, will change to copy kwin and take this mapping
as a desire for fullscreen, but for now testing with maximization.
* src/window.h: remove fullscreen window type, now proposing it
as a window state instead.
2001-10-14 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_maximize): always raise windows on
maximize
(meta_window_client_message): when activating a window, move
it to current workspace, instead of moving user to the
window's workspace.
2001-10-14 Héctor García Álvarez <hector@scouts-es.org> 2001-10-14 Héctor García Álvarez <hector@scouts-es.org>
* configure.in: Added "es" to ALL_LINGUAS for Spanish translation. * configure.in: Added "es" to ALL_LINGUAS for Spanish translation.

View File

@ -574,9 +574,6 @@ window_type_to_string (MetaWindowType type)
case META_WINDOW_MENU: case META_WINDOW_MENU:
return "menu"; return "menu";
break; break;
case META_WINDOW_FULLSCREEN:
return "fullscreen";
break;
} }
return ""; return "";
@ -599,8 +596,6 @@ window_type_from_string (const char *str)
return META_WINDOW_TOOLBAR; return META_WINDOW_TOOLBAR;
else if (strcmp (str, "menu") == 0) else if (strcmp (str, "menu") == 0)
return META_WINDOW_MENU; return META_WINDOW_MENU;
else if (strcmp (str, "fullscreen") == 0)
return META_WINDOW_FULLSCREEN;
else else
return META_WINDOW_NORMAL; return META_WINDOW_NORMAL;
} }

View File

@ -269,10 +269,6 @@ compute_layer (MetaWindow *window)
window->layer = META_LAYER_NORMAL; window->layer = META_LAYER_NORMAL;
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;

View File

@ -356,7 +356,17 @@ meta_window_new (MetaDisplay *display, Window xwindow,
update_title (window); update_title (window);
update_protocols (window); update_protocols (window);
update_wm_hints (window); update_wm_hints (window);
update_net_wm_state (window); update_net_wm_state (window);
/* Initially maximize if window is fullscreen; FIXME
* assume fullscreen state instead once we have that state...
*/
if (!window->maximized &&
window->rect.x == 0 && window->rect.y == 0 &&
window->rect.width == window->screen->width &&
window->rect.height == window->screen->height)
window->maximized = TRUE;
update_mwm_hints (window); update_mwm_hints (window);
update_wm_class (window); update_wm_class (window);
update_transient_for (window); update_transient_for (window);
@ -483,12 +493,6 @@ meta_window_new (MetaDisplay *display, Window xwindow,
} }
} }
if (window->type == META_WINDOW_FULLSCREEN)
{
meta_verbose ("Won't place fullscreen window\n");
window->placed = TRUE;
}
if (window->type == META_WINDOW_DESKTOP || if (window->type == META_WINDOW_DESKTOP ||
window->type == META_WINDOW_DOCK) window->type == META_WINDOW_DOCK)
{ {
@ -1075,6 +1079,8 @@ meta_window_maximize (MetaWindow *window)
{ {
window->maximized = TRUE; window->maximized = TRUE;
meta_window_raise (window);
/* save size/pos as appropriate args for move_resize */ /* save size/pos as appropriate args for move_resize */
window->saved_rect = window->rect; window->saved_rect = window->rect;
if (window->frame) if (window->frame)
@ -2454,14 +2460,11 @@ meta_window_client_message (MetaWindow *window,
{ {
meta_verbose ("_NET_ACTIVE_WINDOW request for window '%s'", window->desc); meta_verbose ("_NET_ACTIVE_WINDOW request for window '%s'", window->desc);
/* Switch to window's workspace - alternatively we could move /* Get window on current workspace */
* window back to this workspace. I don't know which is right.
*/
if (!meta_workspace_contains_window (window->screen->active_workspace, if (!meta_workspace_contains_window (window->screen->active_workspace,
window) && window))
/* this check shouldn't actually be required, I don't think it is */ meta_window_change_workspace (window,
window->workspaces) window->screen->active_workspace);
meta_workspace_activate (window->workspaces->data);
meta_window_raise (window); meta_window_raise (window);
meta_window_focus (window, CurrentTime); /* FIXME CurrentTime */ meta_window_focus (window, CurrentTime); /* FIXME CurrentTime */
@ -4428,13 +4431,6 @@ 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);
@ -4471,8 +4467,7 @@ 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;
@ -4530,8 +4525,7 @@ constrain_size (MetaWindow *window,
/* Get the allowed size ranges, considering maximized, etc. */ /* Get the allowed size ranges, considering maximized, etc. */
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)
{ {
fullw = window->screen->width; fullw = window->screen->width;
fullh = window->screen->height; fullh = window->screen->height;
@ -4652,12 +4646,14 @@ constrain_position (MetaWindow *window,
if (!window->placed && window->calc_placement) if (!window->placed && window->calc_placement)
meta_window_place (window, fgeom, x, y, &x, &y); meta_window_place (window, fgeom, x, y, &x, &y);
if (window->type == META_WINDOW_FULLSCREEN) #if 0
if (window->fullscreen)
{ {
x = 0; x = 0;
y = 0; y = 0;
} }
else if (window->type != META_WINDOW_DESKTOP && #endif
if (window->type != META_WINDOW_DESKTOP &&
window->type != META_WINDOW_DOCK) window->type != META_WINDOW_DOCK)
{ {
int nw_x, nw_y; int nw_x, nw_y;

View File

@ -36,8 +36,7 @@ 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