mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
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>
|
2003-10-25 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
* src/window.c (meta_window_notify_focus): if a window is focused
|
* 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;
|
int i;
|
||||||
MetaWindowMenu *menu;
|
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 = g_new (MetaWindowMenu, 1);
|
||||||
menu->frames = frames;
|
menu->frames = frames;
|
||||||
menu->client_xwindow = client_xwindow;
|
menu->client_xwindow = client_xwindow;
|
||||||
@ -313,16 +316,15 @@ meta_window_menu_new (MetaFrames *frames,
|
|||||||
|
|
||||||
if (ops & META_MENU_OP_WORKSPACES)
|
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;
|
GtkWidget *mi;
|
||||||
Display *display;
|
Display *display;
|
||||||
Window xroot;
|
Window xroot;
|
||||||
GdkScreen *screen;
|
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);
|
display = gdk_x11_drawable_get_xdisplay (GTK_WIDGET (frames)->window);
|
||||||
|
|
||||||
screen = gdk_drawable_get_screen (GTK_WIDGET (frames)->window);
|
screen = gdk_drawable_get_screen (GTK_WIDGET (frames)->window);
|
||||||
@ -380,7 +382,6 @@ meta_window_menu_new (MetaFrames *frames,
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
meta_verbose ("not creating workspace menu\n");
|
meta_verbose ("not creating workspace menu\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user