blob: 6b7d08e1bbc6e0ee43fe7a405d3866fd616192ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
commit 6bea02745202d86a10da82d34f1f6a9233267297
Author: lauri <cand.svn@fltk.example.org>
Date: Tue Nov 4 17:26:47 2014 +0000
The EWMH check requires an open display.
Fixes a crash when a program calls take_focus() before any window has been show()n.
git-svn-id: http://seriss.com/public/fltk/fltk/branches/branch-1.3@10434 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 8e7100b..a0767a3 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -2211,6 +2211,7 @@ int Fl_X::ewmh_supported() {
static int result = -1;
if (result == -1) {
+ fl_open_display();
result = 0;
unsigned long nitems;
unsigned long *words = 0;
|