Skip to content

Commit

Permalink
TEMP: broken: deactivate on unfocus
Browse files Browse the repository at this point in the history
  • Loading branch information
CendioOssman committed Dec 22, 2022
1 parent 306d721 commit 4c75d0e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions vncviewer/DesktopWindow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -881,8 +881,18 @@ int DesktopWindow::fltkDispatch(int event, Fl_Window *win)
if ((event == FL_MOVE) && (win == NULL))
return 0;

if (event == FL_FOCUS) {
win->activate();
win->redraw();
}

ret = Fl::handle_(event, win);

if (event == FL_UNFOCUS) {
win->deactivate();
win->redraw();
}

// This is hackish and the result of the dodgy focus handling in FLTK.
// The basic problem is that FLTK's view of focus and the system's tend
// to differ, and as a result we do not see all the FL_FOCUS events we
Expand Down

0 comments on commit 4c75d0e

Please sign in to comment.