mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
Fix some issues with initial setup of GdkX11DisplayManager
We need to defer setting the default display until the GdkDisplay is fully initialized. Also, short-circuit some encoding conversions when creating windows, to avoid an implicit dependency on the display being in the list of displays yet.
This commit is contained in:
parent
59ea137fa0
commit
48b47971b5
@ -49,7 +49,14 @@ static GdkDisplay *
|
||||
gdk_x11_display_manager_open_display (GdkDisplayManager *manager,
|
||||
const gchar *name)
|
||||
{
|
||||
return _gdk_x11_display_open (name);
|
||||
GdkX11DisplayManager *manager_x11 = GDK_X11_DISPLAY_MANAGER (manager);
|
||||
GdkDisplay *display;
|
||||
|
||||
display = _gdk_x11_display_open (name);
|
||||
if (manager_x11->default_display == NULL)
|
||||
gdk_display_manager_set_default_display (manager, display);
|
||||
|
||||
return display;
|
||||
}
|
||||
|
||||
static GSList *
|
||||
@ -111,9 +118,6 @@ _gdk_x11_display_manager_add_display (GdkDisplayManager *manager,
|
||||
{
|
||||
GdkX11DisplayManager *manager_x11 = GDK_X11_DISPLAY_MANAGER (manager);
|
||||
|
||||
if (manager_x11->displays == NULL)
|
||||
gdk_display_manager_set_default_display (manager, display);
|
||||
|
||||
manager_x11->displays = g_slist_prepend (manager_x11->displays, display);
|
||||
}
|
||||
|
||||
|
@ -2244,7 +2244,7 @@ set_text_property (GdkDisplay *display,
|
||||
if (utf8_is_latin1 (utf8_str))
|
||||
{
|
||||
prop_type = XA_STRING;
|
||||
prop_text = gdk_utf8_to_string_target (utf8_str);
|
||||
prop_text = _gdk_x11_display_utf8_to_string_target (display, utf8_str);
|
||||
prop_length = prop_text ? strlen (prop_text) : 0;
|
||||
prop_format = 8;
|
||||
is_compound_text = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user