mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 23:10:22 +00:00
trayicon-x11: Fix warnings when visual is not available.
This fixes a regression introduced in commit b1a1685a33eca16979e63d79915395af0b36. gdk_visual_get_*_pixel_details() should not be called with a NULL visual. https://bugzilla.gnome.org/show_bug.cgi?id=649588
This commit is contained in:
parent
64b85e7bd8
commit
6754614ac1
@ -505,9 +505,12 @@ gtk_tray_icon_get_visual_property (GtkTrayIcon *icon)
|
|||||||
visual = gdk_x11_screen_lookup_visual (screen, visual_id);
|
visual = gdk_x11_screen_lookup_visual (screen, visual_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
gdk_visual_get_red_pixel_details (visual, NULL, NULL, &red_prec);
|
if (visual != NULL)
|
||||||
gdk_visual_get_green_pixel_details (visual, NULL, NULL, &green_prec);
|
{
|
||||||
gdk_visual_get_blue_pixel_details (visual, NULL, NULL, &blue_prec);
|
gdk_visual_get_red_pixel_details (visual, NULL, NULL, &red_prec);
|
||||||
|
gdk_visual_get_green_pixel_details (visual, NULL, NULL, &green_prec);
|
||||||
|
gdk_visual_get_blue_pixel_details (visual, NULL, NULL, &blue_prec);
|
||||||
|
}
|
||||||
|
|
||||||
icon->priv->manager_visual = visual;
|
icon->priv->manager_visual = visual;
|
||||||
icon->priv->manager_visual_rgba = visual != NULL &&
|
icon->priv->manager_visual_rgba = visual != NULL &&
|
||||||
|
Loading…
Reference in New Issue
Block a user