summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Untz <vuntz@gnome.org>2010-03-31 22:34:02 +0200
committerVincent Untz <vuntz@gnome.org>2010-03-31 22:34:02 +0200
commit333446ab5f6b773b4c8357a302d80155e8851d22 (patch)
tree3b868ee5662d7abab6dbbaecbc1833f412836753
parent7d8972f20d4a41bb9c8afbc45a2eb6a9bbf08b09 (diff)
downloadmetacity-333446ab5f6b773b4c8357a302d80155e8851d22.tar.gz
metacity-333446ab5f6b773b4c8357a302d80155e8851d22.tar.bz2
Fix build with gcc 4.5
Based on patch by Dominique Leuenberger <dominique-gnomezilla@leuenberger.net> https://bugzilla.gnome.org/show_bug.cgi?id=606719
-rw-r--r--src/core/core.c3
-rw-r--r--src/core/window.c13
-rw-r--r--src/include/common.h1
3 files changed, 10 insertions, 7 deletions
diff --git a/src/core/core.c b/src/core/core.c
index a63531f..6d98075 100644
--- a/src/core/core.c
+++ b/src/core/core.c
@@ -519,6 +519,9 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
switch (menu_op)
{
+ case META_MENU_OP_NONE:
+ name = "none";
+ break;
case META_MENU_OP_DELETE:
name = "close";
break;
diff --git a/src/core/window.c b/src/core/window.c
index 8149de3..ebbb047 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -6385,9 +6385,12 @@ menu_callback (MetaWindowMenu *menu,
{
meta_verbose ("Menu op %u on %s\n", op, window->desc);
- /* op can be 0 for none */
switch (op)
{
+ case META_MENU_OP_NONE:
+ /* nothing */
+ break;
+
case META_MENU_OP_DELETE:
meta_window_delete (window, timestamp);
break;
@@ -6475,10 +6478,6 @@ menu_callback (MetaWindowMenu *menu,
meta_window_shove_titlebar_onscreen (window);
break;
- case 0:
- /* nothing */
- break;
-
default:
meta_warning (G_STRLOC": Unknown window op\n");
break;
@@ -6529,8 +6528,8 @@ meta_window_show_menu (MetaWindow *window,
window->display->window_with_menu = NULL;
}
- ops = 0;
- insensitive = 0;
+ ops = META_MENU_OP_NONE;
+ insensitive = META_MENU_OP_NONE;
ops |= (META_MENU_OP_DELETE | META_MENU_OP_MINIMIZE | META_MENU_OP_MOVE | META_MENU_OP_RESIZE);
diff --git a/src/include/common.h b/src/include/common.h
index 8463ced..de2dfff 100644
--- a/src/include/common.h
+++ b/src/include/common.h
@@ -52,6 +52,7 @@ typedef enum
typedef enum
{
+ META_MENU_OP_NONE = 0,
META_MENU_OP_DELETE = 1 << 0,
META_MENU_OP_MINIMIZE = 1 << 1,
META_MENU_OP_UNMAXIMIZE = 1 << 2,