handle CWStackMode in configure requests (meta_window_new): if a window is

2002-05-28  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_configure_request): handle CWStackMode
	in configure requests
	(meta_window_new): if a window is opened at 0,0 and screen size,
	put it in the fullscreen state.
	(meta_window_new): remove old code that set the window position to
	0,0 if PPosition/USPosition unset, that will be handled by whether
	we place the window or not.
This commit is contained in:
Havoc Pennington 2002-05-29 02:22:04 +00:00 committed by Havoc Pennington
parent 0cf10075e1
commit 4b5eda0b0a
2 changed files with 44 additions and 15 deletions

View File

@ -1,3 +1,13 @@
2002-05-28 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_configure_request): handle CWStackMode
in configure requests
(meta_window_new): if a window is opened at 0,0 and screen size,
put it in the fullscreen state.
(meta_window_new): remove old code that set the window position to
0,0 if PPosition/USPosition unset, that will be handled by whether
we place the window or not.
2002-05-28 Abel Cheung <maddog@linux.org.hk>
* configure.in: Added "zh_TW" to ALL_LINGUAS.

View File

@ -443,14 +443,11 @@ meta_window_new (MetaDisplay *display, Window xwindow,
update_struts (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 &&
attrs.x == 0 && attrs.y == 0 &&
if (attrs.x == 0 && attrs.y == 0 &&
attrs.width == window->screen->width &&
attrs.height == window->screen->height)
window->maximized = TRUE;
window->fullscreen = TRUE;
update_mwm_hints (window);
update_wm_class (window);
@ -461,15 +458,6 @@ meta_window_new (MetaDisplay *display, Window xwindow,
update_initial_workspace (window);
update_icon_name (window);
update_icon (window);
if (!window->mapped &&
(window->size_hints.flags & PPosition) == 0 &&
(window->size_hints.flags & USPosition) == 0)
{
/* ignore current window position */
window->size_hints.x = 0;
window->size_hints.y = 0;
}
if (window->initially_iconic)
{
@ -2992,6 +2980,37 @@ meta_window_configure_request (MetaWindow *window,
window->size_hints.width,
window->size_hints.height);
/* Handle stacking. We only handle raises/lowers, mostly because
* stack.c really can't deal with anything else. I guess we'll fix
* that if a client turns up that really requires it. Only a very
* few clients even require the raise/lower (and in fact all client
* attempts to deal with stacking order are essentially broken,
* since they have no idea what other clients are involved or how
* the stack looks).
*
* I'm pretty sure no interesting client uses TopIf, BottomIf, or
* Opposite anyway, so the only possible missing thing is
* Above/Below with a sibling set. For now we just pretend there's
* never a sibling set and always do the full raise/lower instead of
* the raise-just-above/below-sibling.
*/
if (event->xconfigurerequest.value_mask & CWStackMode)
{
switch (event->xconfigurerequest.detail)
{
case Above:
meta_window_raise (window);
break;
case Below:
meta_window_lower (window);
break;
case TopIf:
case BottomIf:
case Opposite:
break;
}
}
return TRUE;
}