mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
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:
parent
bbd6396f40
commit
842eb3fa93
18
ChangeLog
18
ChangeLog
@ -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>
|
||||
|
||||
* configure.in: Added "es" to ALL_LINGUAS for Spanish translation.
|
||||
|
@ -574,9 +574,6 @@ window_type_to_string (MetaWindowType type)
|
||||
case META_WINDOW_MENU:
|
||||
return "menu";
|
||||
break;
|
||||
case META_WINDOW_FULLSCREEN:
|
||||
return "fullscreen";
|
||||
break;
|
||||
}
|
||||
|
||||
return "";
|
||||
@ -599,8 +596,6 @@ window_type_from_string (const char *str)
|
||||
return META_WINDOW_TOOLBAR;
|
||||
else if (strcmp (str, "menu") == 0)
|
||||
return META_WINDOW_MENU;
|
||||
else if (strcmp (str, "fullscreen") == 0)
|
||||
return META_WINDOW_FULLSCREEN;
|
||||
else
|
||||
return META_WINDOW_NORMAL;
|
||||
}
|
||||
|
@ -269,10 +269,6 @@ compute_layer (MetaWindow *window)
|
||||
window->layer = META_LAYER_NORMAL;
|
||||
break;
|
||||
|
||||
case META_WINDOW_FULLSCREEN:
|
||||
window->layer = META_LAYER_FULLSCREEN;
|
||||
break;
|
||||
|
||||
default:
|
||||
window->layer = META_LAYER_NORMAL;
|
||||
break;
|
||||
|
48
src/window.c
48
src/window.c
@ -356,7 +356,17 @@ meta_window_new (MetaDisplay *display, Window xwindow,
|
||||
update_title (window);
|
||||
update_protocols (window);
|
||||
update_wm_hints (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_wm_class (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 ||
|
||||
window->type == META_WINDOW_DOCK)
|
||||
{
|
||||
@ -1075,6 +1079,8 @@ meta_window_maximize (MetaWindow *window)
|
||||
{
|
||||
window->maximized = TRUE;
|
||||
|
||||
meta_window_raise (window);
|
||||
|
||||
/* save size/pos as appropriate args for move_resize */
|
||||
window->saved_rect = window->rect;
|
||||
if (window->frame)
|
||||
@ -2454,14 +2460,11 @@ meta_window_client_message (MetaWindow *window,
|
||||
{
|
||||
meta_verbose ("_NET_ACTIVE_WINDOW request for window '%s'", window->desc);
|
||||
|
||||
/* Switch to window's workspace - alternatively we could move
|
||||
* window back to this workspace. I don't know which is right.
|
||||
*/
|
||||
/* Get window on current workspace */
|
||||
if (!meta_workspace_contains_window (window->screen->active_workspace,
|
||||
window) &&
|
||||
/* this check shouldn't actually be required, I don't think it is */
|
||||
window->workspaces)
|
||||
meta_workspace_activate (window->workspaces->data);
|
||||
window))
|
||||
meta_window_change_workspace (window,
|
||||
window->screen->active_workspace);
|
||||
|
||||
meta_window_raise (window);
|
||||
meta_window_focus (window, CurrentTime); /* FIXME CurrentTime */
|
||||
@ -4428,13 +4431,6 @@ 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);
|
||||
|
||||
@ -4471,8 +4467,7 @@ 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_FULLSCREEN)
|
||||
window->type == META_WINDOW_DOCK)
|
||||
{
|
||||
window->decorated = FALSE;
|
||||
window->has_close_func = FALSE;
|
||||
@ -4530,8 +4525,7 @@ constrain_size (MetaWindow *window,
|
||||
|
||||
/* Get the allowed size ranges, considering maximized, etc. */
|
||||
if (window->type == META_WINDOW_DESKTOP ||
|
||||
window->type == META_WINDOW_DOCK ||
|
||||
window->type == META_WINDOW_FULLSCREEN)
|
||||
window->type == META_WINDOW_DOCK)
|
||||
{
|
||||
fullw = window->screen->width;
|
||||
fullh = window->screen->height;
|
||||
@ -4652,12 +4646,14 @@ constrain_position (MetaWindow *window,
|
||||
if (!window->placed && window->calc_placement)
|
||||
meta_window_place (window, fgeom, x, y, &x, &y);
|
||||
|
||||
if (window->type == META_WINDOW_FULLSCREEN)
|
||||
#if 0
|
||||
if (window->fullscreen)
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
else if (window->type != META_WINDOW_DESKTOP &&
|
||||
#endif
|
||||
if (window->type != META_WINDOW_DESKTOP &&
|
||||
window->type != META_WINDOW_DOCK)
|
||||
{
|
||||
int nw_x, nw_y;
|
||||
|
@ -36,8 +36,7 @@ typedef enum
|
||||
META_WINDOW_DIALOG,
|
||||
META_WINDOW_MODAL_DIALOG,
|
||||
META_WINDOW_TOOLBAR,
|
||||
META_WINDOW_MENU,
|
||||
META_WINDOW_FULLSCREEN
|
||||
META_WINDOW_MENU
|
||||
} MetaWindowType;
|
||||
|
||||
struct _MetaWindow
|
||||
|
Loading…
Reference in New Issue
Block a user