Check for both POPUP and DROPDOWN.

Thu Apr 13 12:23:28 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (meta_screen_info_add_window): Check for both
	POPUP and DROPDOWN.
This commit is contained in:
Søren Sandmann 2006-04-13 16:24:03 +00:00 committed by Søren Sandmann Pedersen
parent ea50cc7239
commit c7c9f0ee52
2 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,8 @@
Thu Apr 13 12:23:28 2006 Søren Sandmann <sandmann@redhat.com>
* src/c-screen.c (meta_screen_info_add_window): Check for both
POPUP and DROPDOWN.
2006-04-13 Björn Lindqvist <bjourne@gmail.com> 2006-04-13 Björn Lindqvist <bjourne@gmail.com>
* src/async-getprop.c, src/async-getprop.h * src/async-getprop.c, src/async-getprop.h

View File

@ -519,9 +519,9 @@ window_info_new (Window xwindow,
} }
static gboolean static gboolean
is_menu (WsWindow *window) has_type (WsWindow *window, const char *check_type)
{ {
gchar **types = ws_window_get_property_atom_list (window, "_NET_WM_UNMANAGED_WINDOW_TYPE"); gchar **types = ws_window_get_property_atom_list (window, "_NET_WM_WINDOW_TYPE");
int i; int i;
gboolean result; gboolean result;
@ -534,7 +534,9 @@ is_menu (WsWindow *window)
{ {
gchar *type = types[i]; gchar *type = types[i];
if (strcmp (type, "_NET_WM_UNMANAGED_WINDOW_TYPE_DROPDOWN_MENU") == 0) g_print ("type: %s\n", type);
if (strcmp (type, check_type) == 0)
{ {
result = TRUE; result = TRUE;
break; break;
@ -613,13 +615,17 @@ out:
g_print ("set alpha %f\n", alpha); g_print ("set alpha %f\n", alpha);
#endif #endif
if (is_menu (drawable)) if (has_type (drawable, "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU"))
{ {
#if 0 #if 0
g_print ("is menu\n"); g_print ("is menu\n");
#endif #endif
alpha = 0.9; alpha = 0.9;
} }
else if (has_type (drawable, "_NET_WM_WINDOW_TYPE_POPUP_MENU"))
{
alpha = 0.9;
}
else else
{ {
#if 0 #if 0