- Fix shift key getting stuck on some cases
PR: 193630 Submitted by: mike.d.ft402@gmail.com
This commit is contained in:
parent
d162675dfd
commit
2f6d6d9c2a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=369567
2 changed files with 24 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= osg
|
||||
PORTVERSION= 3.2.0
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= http://trac.openscenegraph.org/downloads/developer_releases/ \
|
||||
http://mirror.amdmi3.ru/distfiles/
|
||||
|
|
23
graphics/osg/files/patch-shift-key-fix
Normal file
23
graphics/osg/files/patch-shift-key-fix
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Shift key not released if group switch is something other than Control-Shift:
|
||||
# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1218650.html
|
||||
|
||||
--- src/osgGA/EventQueue.cpp.orig
|
||||
+++ src/osgGA/EventQueue.cpp
|
||||
@@ -337,7 +337,7 @@ void EventQueue::mouseButtonRelease(floa
|
||||
|
||||
void EventQueue::keyPress(int key, double time, int unmodifiedKey)
|
||||
{
|
||||
- switch(key)
|
||||
+ switch(unmodifiedKey)
|
||||
{
|
||||
case(GUIEventAdapter::KEY_Shift_L): _accumulateEventState->setModKeyMask(GUIEventAdapter::MODKEY_LEFT_SHIFT | _accumulateEventState->getModKeyMask()); break;
|
||||
case(GUIEventAdapter::KEY_Shift_R): _accumulateEventState->setModKeyMask(GUIEventAdapter::MODKEY_RIGHT_SHIFT | _accumulateEventState->getModKeyMask()); break;
|
||||
@@ -381,7 +381,7 @@ void EventQueue::keyPress(int key, doubl
|
||||
|
||||
void EventQueue::keyRelease(int key, double time, int unmodifiedKey)
|
||||
{
|
||||
- switch(key)
|
||||
+ switch(unmodifiedKey)
|
||||
{
|
||||
case(GUIEventAdapter::KEY_Shift_L): _accumulateEventState->setModKeyMask(~GUIEventAdapter::MODKEY_LEFT_SHIFT & _accumulateEventState->getModKeyMask()); break;
|
||||
case(GUIEventAdapter::KEY_Shift_R): _accumulateEventState->setModKeyMask(~GUIEventAdapter::MODKEY_RIGHT_SHIFT & _accumulateEventState->getModKeyMask()); break;
|
Loading…
Reference in a new issue