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
This commit is contained in:
parent
e19d4c048a
commit
a40a9eccf4
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
|||||||
|
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>
|
2002-05-26 Matthias Warkus <mawarkus@gnome.org>
|
||||||
|
|
||||||
* po/de.po: Added.
|
* po/de.po: Added.
|
||||||
|
@ -1662,6 +1662,9 @@ handle_move_to_workspace (MetaDisplay *display,
|
|||||||
|
|
||||||
which = GPOINTER_TO_INT (binding->handler->data);
|
which = GPOINTER_TO_INT (binding->handler->data);
|
||||||
|
|
||||||
|
if (window == NULL || window->always_sticky)
|
||||||
|
return;
|
||||||
|
|
||||||
workspace = NULL;
|
workspace = NULL;
|
||||||
if (which < 0)
|
if (which < 0)
|
||||||
{
|
{
|
||||||
|
@ -312,7 +312,8 @@ meta_window_menu_new (MetaFrames *frames,
|
|||||||
(active_workspace == i ||
|
(active_workspace == i ||
|
||||||
insensitive & META_MENU_OP_WORKSPACES))
|
insensitive & META_MENU_OP_WORKSPACES))
|
||||||
gtk_widget_set_sensitive (mi, FALSE);
|
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 = g_new (MenuData, 1);
|
||||||
|
|
||||||
md->menu = menu;
|
md->menu = menu;
|
||||||
|
11
src/window.c
11
src/window.c
@ -2718,7 +2718,7 @@ meta_window_focus (MetaWindow *window,
|
|||||||
void
|
void
|
||||||
meta_window_change_workspace (MetaWindow *window,
|
meta_window_change_workspace (MetaWindow *window,
|
||||||
MetaWorkspace *workspace)
|
MetaWorkspace *workspace)
|
||||||
{
|
{
|
||||||
meta_verbose ("Changing window %s to workspace %d\n",
|
meta_verbose ("Changing window %s to workspace %d\n",
|
||||||
window->desc, meta_workspace_index (workspace));
|
window->desc, meta_workspace_index (workspace));
|
||||||
|
|
||||||
@ -4844,10 +4844,16 @@ recalc_window_features (MetaWindow *window)
|
|||||||
|
|
||||||
window->has_shade_func = TRUE;
|
window->has_shade_func = TRUE;
|
||||||
window->has_fullscreen_func = TRUE;
|
window->has_fullscreen_func = TRUE;
|
||||||
|
|
||||||
|
window->always_sticky = FALSE;
|
||||||
|
|
||||||
/* Semantic category overrides the MWM hints */
|
/* Semantic category overrides the MWM hints */
|
||||||
if (window->type == META_WINDOW_TOOLBAR)
|
if (window->type == META_WINDOW_TOOLBAR)
|
||||||
window->decorated = FALSE;
|
window->decorated = FALSE;
|
||||||
|
|
||||||
|
if (window->type == META_WINDOW_DESKTOP ||
|
||||||
|
window->type == META_WINDOW_DOCK)
|
||||||
|
window->always_sticky = TRUE;
|
||||||
|
|
||||||
if (window->type == META_WINDOW_DESKTOP ||
|
if (window->type == META_WINDOW_DESKTOP ||
|
||||||
window->type == META_WINDOW_DOCK ||
|
window->type == META_WINDOW_DOCK ||
|
||||||
@ -5360,6 +5366,9 @@ meta_window_show_menu (MetaWindow *window,
|
|||||||
|
|
||||||
if (!window->has_resize_func)
|
if (!window->has_resize_func)
|
||||||
insensitive |= META_MENU_OP_RESIZE;
|
insensitive |= META_MENU_OP_RESIZE;
|
||||||
|
|
||||||
|
if (window->always_sticky)
|
||||||
|
insensitive |= META_MENU_OP_UNSTICK | META_MENU_OP_WORKSPACES;
|
||||||
|
|
||||||
menu =
|
menu =
|
||||||
meta_ui_window_menu_new (window->screen->ui,
|
meta_ui_window_menu_new (window->screen->ui,
|
||||||
|
@ -139,6 +139,7 @@ struct _MetaWindow
|
|||||||
|
|
||||||
/* Computed features of window */
|
/* Computed features of window */
|
||||||
guint decorated : 1;
|
guint decorated : 1;
|
||||||
|
guint always_sticky : 1;
|
||||||
guint has_close_func : 1;
|
guint has_close_func : 1;
|
||||||
guint has_minimize_func : 1;
|
guint has_minimize_func : 1;
|
||||||
guint has_maximize_func : 1;
|
guint has_maximize_func : 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user