From: andy Date: Thu, 1 Apr 2004 23:28:47 +0000 (+0000) Subject: I was too agressive in the fg_os port. Glut doesn't support grabbing X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=95e8b639883a6f4d61ba48a5f4fa0ed80446d353;p=flightgear.git I was too agressive in the fg_os port. Glut doesn't support grabbing the keyboard modifiers outside of a key event handler, so adding the fgGetKeyModifiers() call to doMouseMotion was broken. The user could see "phantom" modifier keys. --- diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 6253a2990..744135836 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -304,7 +304,10 @@ FGInput::doMouseClick (int b, int updown, int x, int y) void FGInput::doMouseMotion (int x, int y) { - int modifiers = fgGetKeyModifiers(); + // Don't call fgGetKeyModifiers() here, until we are using a + // toolkit that supports getting the mods from outside a key + // callback. Glut doesn't. + int modifiers = KEYMOD_NONE; int xsize = fgGetInt("/sim/startup/xsize", 800); int ysize = fgGetInt("/sim/startup/ysize", 600);