Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2015-04-07 15:08:30 +0300
committerJulian Eisel <eiseljulian@gmail.com>2015-04-07 15:13:20 +0300
commitcc78664d50c6ae82d139552283ede467b0cf28cc (patch)
tree96575149c8b9fef5e8e8a3883d55f4e385deda74 /source/blender/windowmanager/WM_types.h
parentd60ff6c112b1c5d3819676109b0080a316850eb0 (diff)
Revert Sticky Keys (and everything related to that)
Our current keymap doesn't give us enough room to make such changes in the event system. To fix small issues caused by this, we would need to do drastic changes in Blender's keymaps and internal handling. It was worth a try, but it didn't work. I can write down a more descriptive statement in a few days, but for now I need a break of this stuff.
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r--source/blender/windowmanager/WM_types.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 366d3218176..e716cd6b779 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -180,11 +180,9 @@ enum {
#define KM_NOTHING 0
#define KM_PRESS 1
#define KM_RELEASE 2
+#define KM_CLICK 3
+#define KM_DBL_CLICK 4
-/* clicktype */
-#define KM_CLICK 3 /* clicked key (click_time <= U.click_timeout) */
-#define KM_DBL_CLICK 4 /* double click - keep at 4 to avoid breakage with older key configs */
-#define KM_HOLD 5 /* held key (click_time > U.click_timeout) */
/* ************** UI Handler ***************** */
@@ -429,9 +427,7 @@ typedef struct wmEvent {
short type; /* event code itself (short, is also in keymap) */
short val; /* press, release, scrollvalue */
- short click_type; /* click, hold or double click */
int x, y; /* mouse pointer position, screen coord */
- double click_time; /* the time since keypress started */
int mval[2]; /* region mouse position, name convention pre 2.5 :) */
char utf8_buf[6]; /* from, ghost if utf8 is enabled for the platform,
* BLI_str_utf8_size() must _always_ be valid, check
@@ -439,19 +435,20 @@ typedef struct wmEvent {
char ascii; /* from ghost, fallback if utf8 isn't set */
char pad;
- bool is_key_pressed; /* is a (non-modifier) key is pressed? (keyboard, mouse, NDOF, ...) */
-
- /* previous state, used for clicktype */
+ /* previous state, used for double click and the 'click' */
short prevtype;
short prevval;
int prevx, prevy;
- double prevclick_time;
+ double prevclicktime;
int prevclickx, prevclicky;
/* modifier states */
short shift, ctrl, alt, oskey; /* oskey is apple or windowskey, value denotes order of pressed */
short keymodifier; /* rawkey modifier */
+ /* set in case a KM_PRESS went by unhandled */
+ short check_click;
+
/* keymap item, set by handler (weak?) */
const char *keymap_idname;