[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[825] trunk/fuse/fusepb
Brought to you by:
fredm
|
From: <fr...@us...> - 2016-09-30 12:43:51
|
Revision: 825
http://sourceforge.net/p/fuse-for-macosx/code/825
Author: fredm
Date: 2016-09-30 12:43:49 +0000 (Fri, 30 Sep 2016)
Log Message:
-----------
Try to fix stuck keys when Tab is combined with Command and when window focus is
lost (bugs# 22).
Modified Paths:
--------------
trunk/fuse/fusepb/models/Emulator.h
trunk/fuse/fusepb/models/Emulator.m
trunk/fuse/fusepb/views/DisplayOpenGLView.h
trunk/fuse/fusepb/views/DisplayOpenGLView.m
Modified: trunk/fuse/fusepb/models/Emulator.h
===================================================================
--- trunk/fuse/fusepb/models/Emulator.h 2016-09-30 12:06:54 UTC (rev 824)
+++ trunk/fuse/fusepb/models/Emulator.h 2016-09-30 12:43:49 UTC (rev 825)
@@ -157,6 +157,7 @@
-(void) modifierChange:(input_event_type)theType oldState:(BOOL)old newState:(BOOL)new;
-(void) flagsChanged:(NSEvent *)theEvent;
-(input_key) otherKeysymsRemap:(libspectrum_dword)ui_keysym inHash:(GHashTable*)hash;
+-(void) keyboardReleaseAll;
-(void) keyChange:(NSEvent *)theEvent type:(input_event_type)type;
-(void) keyDown:(NSEvent *)theEvent;
-(void) keyUp:(NSEvent *)theEvent;
Modified: trunk/fuse/fusepb/models/Emulator.m
===================================================================
--- trunk/fuse/fusepb/models/Emulator.m 2016-09-30 12:06:54 UTC (rev 824)
+++ trunk/fuse/fusepb/models/Emulator.m 2016-09-30 12:43:49 UTC (rev 825)
@@ -665,6 +665,8 @@
[self modifierChange:INPUT_KEY_Alt_L oldState:optDown newState:optDownNew];
[self modifierChange:INPUT_KEY_Control_L oldState:ctrlDown newState:ctrlDownNew];
[self modifierChange:INPUT_KEY_Shift_L oldState:shiftDown newState:shiftDownNew];
+ } else {
+ keyboard_release_all();
}
optDown = optDownNew;
@@ -719,6 +721,11 @@
}
}
+-(void) keyboardReleaseAll
+{
+ keyboard_release_all();
+}
+
-(void) keyChange:(NSEvent *)theEvent type:(input_event_type)type
{
if( [theEvent isARepeat] == YES ) return;
Modified: trunk/fuse/fusepb/views/DisplayOpenGLView.h
===================================================================
--- trunk/fuse/fusepb/views/DisplayOpenGLView.h 2016-09-30 12:06:54 UTC (rev 824)
+++ trunk/fuse/fusepb/views/DisplayOpenGLView.h 2016-09-30 12:43:49 UTC (rev 825)
@@ -221,6 +221,7 @@
-(void) windowWillMiniaturize:(NSNotification *)aNotification;
-(void) windowDidMiniaturize:(NSNotification *)notification;
-(BOOL) windowShouldClose:(id)window;
+-(void) windowDidResignKey:(NSNotification *)notification;
-(CVReturn) displayFrame:(const CVTimeStamp *)timeStamp;
-(void) windowChangedScreen:(NSNotification*)inNotification;
Modified: trunk/fuse/fusepb/views/DisplayOpenGLView.m
===================================================================
--- trunk/fuse/fusepb/views/DisplayOpenGLView.m 2016-09-30 12:06:54 UTC (rev 824)
+++ trunk/fuse/fusepb/views/DisplayOpenGLView.m 2016-09-30 12:43:49 UTC (rev 825)
@@ -382,6 +382,11 @@
[self release];
}
+- (void)windowDidResignKey:(NSNotification *)notification
+{
+ [proxy_emulator keyboardReleaseAll];
+}
+
-(void) loadPicture: (NSString *) name
greenTex:(Texture*) greenTexture
redTex:(Texture*) redTexture
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|