mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
x11: Fix initialization mess
When prepare_gl fails in the right way (or the wrong way?), we end up creating the leader window twice, and as a side effect, creating two instances of the "Virtual core pointer" device, which is bad news for grabs. Fixes: #6840
This commit is contained in:
parent
ae8a06cdca
commit
5b6b42b5a9
@ -1484,8 +1484,11 @@ gdk_x11_display_open (const char *display_name)
|
|||||||
*/
|
*/
|
||||||
if (!gdk_display_prepare_gl (display, NULL))
|
if (!gdk_display_prepare_gl (display, NULL))
|
||||||
{
|
{
|
||||||
gdk_x11_display_query_default_visual (display_x11, &display_x11->window_visual, &display_x11->window_depth);
|
if (!display_x11->leader_gdk_surface)
|
||||||
gdk_x11_display_init_leader_surface (display_x11);
|
{
|
||||||
|
gdk_x11_display_query_default_visual (display_x11, &display_x11->window_visual, &display_x11->window_depth);
|
||||||
|
gdk_x11_display_init_leader_surface (display_x11);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_XFIXES
|
#ifdef HAVE_XFIXES
|
||||||
|
Loading…
Reference in New Issue
Block a user