Permalink
Browse files

Put popup menus into a separate window group which appears on top of …

…everything else
  • Loading branch information...
1 parent ae0fd73 commit 9e45c4c8f1cc2f92f266a5f8e1c4e83d4ce70ef1 @glebihan glebihan committed Mar 10, 2012
Showing with 26 additions and 3 deletions.
  1. +1 −1 src/compositor/compositor-private.h
  2. +18 −0 src/compositor/compositor.c
  3. +7 −2 src/compositor/meta-window-actor.c
View
2 src/compositor/compositor-private.h
@@ -35,7 +35,7 @@ struct _MetaCompScreen
{
MetaScreen *screen;
- ClutterActor *stage, *window_group, *overlay_group;
+ ClutterActor *stage, *window_group, *overlay_group, *top_window_group;
ClutterActor *background_actor;
ClutterActor *hidden_group;
GList *windows;
View
18 src/compositor/compositor.c
@@ -232,6 +232,23 @@ meta_get_window_group_for_screen (MetaScreen *screen)
}
/**
+ * meta_get_top_window_group_for_screen:
+ * @screen: a #MetaScreen
+ *
+ * Returns: (transfer none): The top window group corresponding to @screen
+ */
+ClutterActor *
+meta_get_top_window_group_for_screen (MetaScreen *screen)
+{
+ MetaCompScreen *info = meta_screen_get_compositor_data (screen);
+
+ if (!info)
+ return NULL;
+
+ return info->top_window_group;
+}
+
+/**
* meta_get_background_actor_for_screen:
* @screen: a #MetaScreen
*
@@ -541,6 +558,7 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
info->window_group = meta_window_group_new (screen);
info->background_actor = meta_background_actor_new_for_screen (screen);
info->overlay_group = clutter_group_new ();
+ info->top_window_group = meta_window_group_new (screen);
info->hidden_group = clutter_group_new ();
clutter_container_add (CLUTTER_CONTAINER (info->window_group),
View
9 src/compositor/meta-window-actor.c
@@ -1532,9 +1532,14 @@ meta_window_actor_new (MetaWindow *window)
/* Hang our compositor window state off the MetaWindow for fast retrieval */
meta_window_set_compositor_private (window, G_OBJECT (self));
-
- clutter_container_add_actor (CLUTTER_CONTAINER (info->window_group),
+
+ if (window->type == META_WINDOW_POPUP_MENU){
+ clutter_container_add_actor (CLUTTER_CONTAINER (info->top_window_group),
+ CLUTTER_ACTOR (self));
+ }else{
+ clutter_container_add_actor (CLUTTER_CONTAINER (info->window_group),
CLUTTER_ACTOR (self));
+ }
clutter_actor_hide (CLUTTER_ACTOR (self));
/* Initial position in the stack is arbitrary; stacking will be synced

4 comments on commit 9e45c4c

@im-kulikov

get error when build package (archlinux):

This is the stable branch of muffin
make all-recursive
make[1]: Вход в каталог /tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build'
Making all in src
make[2]: Вход в каталог
/tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build/src'
/usr/bin/gdk-pixbuf-csource --raw --build-list stock_maximize_data ./stock_maximize.png stock_minimize_data ./stock_minimize.png stock_delete_data ./stock_delete.png >./inlinepixbufs.h
GEN muffin-marshal.c
GEN stamp-muffin-marshal.h
GEN stamp-muffin-enum-types.h
GEN muffin-enum-types.c
make all-recursive
make[3]: Вход в каталог /tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build/src'
Making all in wm-tester
make[4]: Вход в каталог
/tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build/src/wm-tester'
CC test-resizing.o
CC test-gravity.o
CC test-attached.o
CC test-size-hints.o
CC main.o
CC focus-window.o
CCLD focus-window
CCLD test-size-hints
CCLD test-gravity
CCLD test-resizing
CCLD test-attached
CCLD wm-tester
make[4]: Выход из каталога /tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build/src/wm-tester'
Making all in tools
make[4]: Вход в каталог
/tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build/src/tools'
CC muffin-message.o
CC muffin-mag.o
CC muffin-grayscale.o
CC muffin-window-demo.o
CCLD muffin-grayscale
CCLD muffin-window-demo
CCLD muffin-message
CCLD muffin-mag
make[4]: Выход из каталога /tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build/src/tools'
Making all in compositor/plugins
make[4]: Вход в каталог
/tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build/src/compositor/plugins'
CC default_la-default.lo
CCLD default.la
make[4]: Выход из каталога /tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build/src/compositor/plugins'
make[4]: Вход в каталог
/tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build/src'
CC async-getprop.lo
CC bell.lo
CC cogl-utils.lo
CC boxes.lo
CC meta-background-actor.lo
CC meta-plugin.lo
CC meta-plugin-manager.lo
CC compositor.lo
CC meta-module.lo
CC meta-shadow-factory.lo
CC meta-shaped-texture.lo
CC meta-texture-rectangle.lo
compositor/compositor.c:241:1: error: no previous prototype for 'meta_get_top_window_group_for_screen' [-Werror=missing-prototypes]
cc1: all warnings being treated as errors
make[4]: *** [compositor.lo] Ошибка 1
make[4]: *** Ожидание завершения заданий...
make[4]: Выход из каталога /tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build/src'
make[3]: *** [all-recursive] Ошибка 1
make[3]: Выход из каталога
/tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build/src'
make[2]: *** [all] Ошибка 2
make[2]: Выход из каталога /tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build/src'
make[1]: *** [all-recursive] Ошибка 1
make[1]: Выход из каталога
/tmp/yaourt-tmp-akulikov/aur-muffin-git/src/muffin-build'
make: *** [all] Ошибка 2

@mysteriousmudcrab

Not sure if this is related, but after a muffin update popup menus do not display: https://bbs.archlinux.org/viewtopic.php?id=137481

Normal drop-down menus work fine.

@glebihan
Linux Mint member

@mysteriousmudcrab: you need to install the latest git version of cinnamon as well to solve this

@mysteriousmudcrab

Thanks, all working now!

Please sign in to comment.