Robustness fix for the first window
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
7ebbe0baf4
commit
523c657f2e
@ -113,7 +113,7 @@ unsigned char Fl::options_[] = { 0, 0 };
|
||||
unsigned char Fl::options_read_ = 0;
|
||||
|
||||
|
||||
Fl_Window *fl_xfocus; // which window X thinks has focus
|
||||
Fl_Window *fl_xfocus = NULL; // which window X thinks has focus
|
||||
Fl_Window *fl_xmousewin;// which window X thinks has FL_ENTER
|
||||
Fl_Window *Fl::grab_; // most recent Fl::grab()
|
||||
Fl_Window *Fl::modal_; // topmost modal() window
|
||||
|
@ -2213,12 +2213,17 @@ void Fl_X::activate_window(Window w) {
|
||||
if (!ewmh_supported())
|
||||
return;
|
||||
|
||||
Window prev = 0;
|
||||
|
||||
if (fl_xfocus) {
|
||||
Fl_X *x = Fl_X::i(fl_xfocus);
|
||||
if (!x)
|
||||
return;
|
||||
prev = x->xid;
|
||||
}
|
||||
|
||||
send_wm_event(w, fl_NET_ACTIVE_WINDOW, 1 /* application */,
|
||||
0 /* timestamp */, x->xid /* previously active window */);
|
||||
0 /* timestamp */, prev /* previously active window */);
|
||||
}
|
||||
|
||||
/* Change an existing window to fullscreen */
|
||||
|
Loading…
Reference in New Issue
Block a user