Commit a40a9ecc authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington
Browse files

Patch from Gaute Lindkvist so you can't move the panel or desktop to only

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

        Patch from Gaute Lindkvist so you can't move the panel or desktop
	to only one workspace.

	* src/keybindings.c (handle_move_to_workspace): don't allow moving
	window to another space if the window is always_sticky

	* src/window.c (recalc_window_features): set the always_sticky
	field for desktop/dock windows.
	(meta_window_show_menu): disable unsticking always sticky windows
	via the menus

	* src/menu.c (meta_window_menu_new): disable workspace items
	if requested
parent e19d4c04
2002-05-26 Havoc Pennington <hp@pobox.com>
Patch from Gaute Lindkvist so you can't move the panel or desktop
to only one workspace.
* src/keybindings.c (handle_move_to_workspace): don't allow moving
window to another space if the window is always_sticky
* src/window.c (recalc_window_features): set the always_sticky
field for desktop/dock windows.
(meta_window_show_menu): disable unsticking always sticky windows
via the menus
* src/menu.c (meta_window_menu_new): disable workspace items
if requested
2002-05-26 Matthias Warkus <mawarkus@gnome.org>
* po/de.po: Added.
......
......@@ -1662,6 +1662,9 @@ handle_move_to_workspace (MetaDisplay *display,
which = GPOINTER_TO_INT (binding->handler->data);
if (window == NULL || window->always_sticky)
return;
workspace = NULL;
if (which < 0)
{
......
......@@ -312,7 +312,8 @@ meta_window_menu_new (MetaFrames *frames,
(active_workspace == i ||
insensitive & META_MENU_OP_WORKSPACES))
gtk_widget_set_sensitive (mi, FALSE);
else if (insensitive & META_MENU_OP_WORKSPACES)
gtk_widget_set_sensitive (mi, FALSE);
md = g_new (MenuData, 1);
md->menu = menu;
......
......@@ -2718,7 +2718,7 @@ meta_window_focus (MetaWindow *window,
void
meta_window_change_workspace (MetaWindow *window,
MetaWorkspace *workspace)
{
{
meta_verbose ("Changing window %s to workspace %d\n",
window->desc, meta_workspace_index (workspace));
......@@ -4844,10 +4844,16 @@ recalc_window_features (MetaWindow *window)
window->has_shade_func = TRUE;
window->has_fullscreen_func = TRUE;
window->always_sticky = FALSE;
/* Semantic category overrides the MWM hints */
if (window->type == META_WINDOW_TOOLBAR)
window->decorated = FALSE;
if (window->type == META_WINDOW_DESKTOP ||
window->type == META_WINDOW_DOCK)
window->always_sticky = TRUE;
if (window->type == META_WINDOW_DESKTOP ||
window->type == META_WINDOW_DOCK ||
......@@ -5360,6 +5366,9 @@ meta_window_show_menu (MetaWindow *window,
if (!window->has_resize_func)
insensitive |= META_MENU_OP_RESIZE;
if (window->always_sticky)
insensitive |= META_MENU_OP_UNSTICK | META_MENU_OP_WORKSPACES;
menu =
meta_ui_window_menu_new (window->screen->ui,
......
......@@ -139,6 +139,7 @@ struct _MetaWindow
/* Computed features of window */
guint decorated : 1;
guint always_sticky : 1;
guint has_close_func : 1;
guint has_minimize_func : 1;
guint has_maximize_func : 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment