Browse Source

Sanity check when cleaning up keymap changes

Make sure we don't send a bogus request to the X server in the (common)
case that we don't actually have anything to restore.
pull/1517/merge
Pierre Ossman 1 year ago
parent
commit
1e3484f201
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      unix/x0vncserver/XDesktop.cxx

+ 4
- 0
unix/x0vncserver/XDesktop.cxx View File

@@ -481,6 +481,10 @@ void XDesktop::deleteAddedKeysyms(Display* dpy) {
}
}

// Did we actually find something to remove?
if (highestKeyCode < lowestKeyCode)
return;

changes.changed |= XkbKeySymsMask;
changes.first_key_sym = lowestKeyCode;
changes.num_key_syms = highestKeyCode - lowestKeyCode + 1;

Loading…
Cancel
Save