patch to avoid creating stick/unstick menu items when only one workspace,
2003-10-30 Havoc Pennington <hp@redhat.com> * src/menu.c (meta_window_menu_new): patch to avoid creating stick/unstick menu items when only one workspace, bug #116563 from Michael Terry
This commit is contained in:
parent
18b38ac526
commit
830a52ee25
@ -1,3 +1,9 @@
|
||||
2003-10-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* src/menu.c (meta_window_menu_new): patch to avoid creating
|
||||
stick/unstick menu items when only one workspace, bug #116563
|
||||
from Michael Terry
|
||||
|
||||
2003-10-25 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* src/window.c (meta_window_notify_focus): if a window is focused
|
||||
|
11
src/menu.c
11
src/menu.c
@ -232,6 +232,9 @@ meta_window_menu_new (MetaFrames *frames,
|
||||
int i;
|
||||
MetaWindowMenu *menu;
|
||||
|
||||
if (n_workspaces < 2)
|
||||
ops &= ~(META_MENU_OP_STICK | META_MENU_OP_UNSTICK | META_MENU_OP_WORKSPACES);
|
||||
|
||||
menu = g_new (MetaWindowMenu, 1);
|
||||
menu->frames = frames;
|
||||
menu->client_xwindow = client_xwindow;
|
||||
@ -313,16 +316,15 @@ meta_window_menu_new (MetaFrames *frames,
|
||||
|
||||
if (ops & META_MENU_OP_WORKSPACES)
|
||||
{
|
||||
meta_verbose ("Creating %d-workspace menu current space %d\n",
|
||||
n_workspaces, active_workspace);
|
||||
|
||||
if (n_workspaces > 1)
|
||||
{
|
||||
GtkWidget *mi;
|
||||
Display *display;
|
||||
Window xroot;
|
||||
GdkScreen *screen;
|
||||
|
||||
meta_verbose ("Creating %d-workspace menu current space %d\n",
|
||||
n_workspaces, active_workspace);
|
||||
|
||||
display = gdk_x11_drawable_get_xdisplay (GTK_WIDGET (frames)->window);
|
||||
|
||||
screen = gdk_drawable_get_screen (GTK_WIDGET (frames)->window);
|
||||
@ -380,7 +382,6 @@ meta_window_menu_new (MetaFrames *frames,
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
meta_verbose ("not creating workspace menu\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user