don't allow shade/maximize/minimize for windows that don't support those

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

	* src/window.c (meta_window_client_message): don't allow
	shade/maximize/minimize for windows that don't support those
	operations. (minimizing the panel = bad)
This commit is contained in:
Havoc Pennington 2001-10-07 22:11:13 +00:00 committed by Havoc Pennington
parent 350ecb1dcf
commit ec4dfd0cbc
4 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2001-10-07 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_client_message): don't allow
shade/maximize/minimize for windows that don't support those
operations. (minimizing the panel = bad)
2001-10-04 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (meta_change_keygrab): add code to grab all

View File

@ -257,10 +257,10 @@ meta_window_menu_new (MetaFrames *frames,
MenuData *md;
if (ops & META_MENU_OP_UNSTICK)
label = g_strdup_printf (_("Only on workspace _%d\n"),
label = g_strdup_printf (_("Only on workspace _%d"),
i + 1);
else
label = g_strdup_printf (_("Move to workspace _%d\n"),
label = g_strdup_printf (_("Move to workspace _%d"),
i + 1);
mi = gtk_menu_item_new_with_mnemonic (label);

View File

@ -2287,7 +2287,7 @@ meta_window_client_message (MetaWindow *window,
shade = (action == _NET_WM_STATE_ADD ||
(action == _NET_WM_STATE_TOGGLE && !window->shaded));
if (shade)
if (shade && window->has_shade_func)
meta_window_shade (window);
else
meta_window_unshade (window);
@ -2302,7 +2302,7 @@ meta_window_client_message (MetaWindow *window,
max = (action == _NET_WM_STATE_ADD ||
(action == _NET_WM_STATE_TOGGLE && !window->maximized));
if (max)
if (max && window->has_maximize_func)
meta_window_maximize (window);
else
meta_window_unmaximize (window);
@ -2346,7 +2346,8 @@ meta_window_client_message (MetaWindow *window,
{
meta_verbose ("WM_CHANGE_STATE client message, state: %ld\n",
event->xclient.data.l[0]);
if (event->xclient.data.l[0] == IconicState)
if (event->xclient.data.l[0] == IconicState &&
window->has_minimize_func)
meta_window_minimize (window);
return TRUE;
@ -3549,7 +3550,7 @@ get_cardinal (MetaDisplay *display,
return FALSE;
if (type != XA_CARDINAL)
return FALSE;
return FALSE; /* FIXME free num ? */
*val = *num;