mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-12 20:00:09 +00:00
inspector: Don't use global variable here
When inspecting the inspector, we want to create mutiple displays here. If we need this to be global, we should store it per-inspected-display.
This commit is contained in:
parent
7953092059
commit
e54567611b
@ -679,20 +679,16 @@ gtk_inspector_window_class_init (GtkInspectorWindowClass *klass)
|
||||
static GdkDisplay *
|
||||
get_inspector_display (void)
|
||||
{
|
||||
static GdkDisplay *display = NULL;
|
||||
GdkDisplay *display;
|
||||
const char *name;
|
||||
|
||||
if (display == NULL)
|
||||
{
|
||||
const char *name;
|
||||
name = g_getenv ("GTK_INSPECTOR_DISPLAY");
|
||||
display = gdk_display_open (name);
|
||||
|
||||
name = g_getenv ("GTK_INSPECTOR_DISPLAY");
|
||||
display = gdk_display_open (name);
|
||||
|
||||
if (display)
|
||||
g_debug ("Using display %s for GtkInspector", name);
|
||||
else
|
||||
g_message ("Failed to open display %s", name);
|
||||
}
|
||||
if (display)
|
||||
g_debug ("Using display %s for GtkInspector", name);
|
||||
else
|
||||
g_message ("Failed to open display %s", name);
|
||||
|
||||
if (!display)
|
||||
{
|
||||
@ -706,7 +702,6 @@ get_inspector_display (void)
|
||||
|
||||
if (display)
|
||||
{
|
||||
const char *name;
|
||||
GdkDebugFlags flags;
|
||||
|
||||
name = g_getenv ("GTK_INSPECTOR_RENDERER");
|
||||
|
Loading…
Reference in New Issue
Block a user