index 9941c10f8f46257c10f3ee5465448a29904df4b4..8615df7a97064865933626a9d38b95e6f0fdbd8a 100644 (file)
guint Rotateable::get_single_modifier(guint old, guint state) {
guint Rotateable::get_single_modifier(guint old, guint state) {
- if (old == 0) {
+ if (old == 0 || old == 3) {
if (state & GDK_CONTROL_MASK)
return 1; // ctrl
if (state & GDK_SHIFT_MASK)
return 2; // shift
if (state & GDK_CONTROL_MASK)
return 1; // ctrl
if (state & GDK_SHIFT_MASK)
return 2; // shift
+ if (state & GDK_MOD1_MASK)
+ return 3; // alt
return 0;
} else {
return 0;
} else {
- if (!(state & GDK_CONTROL_MASK) && !(state & GDK_SHIFT_MASK))
- return 0; // none
- if (old == 1)
+ if (!(state & GDK_CONTROL_MASK) && !(state & GDK_SHIFT_MASK)) {
+ if (state & GDK_MOD1_MASK)
+ return 3; // alt
+ else
+ return 0; // none
+ }
+ if (old == 1) {
if (state & GDK_SHIFT_MASK && !(state & GDK_CONTROL_MASK))
return 2; // shift
if (state & GDK_SHIFT_MASK && !(state & GDK_CONTROL_MASK))
return 2; // shift
- else
- return 1;
- if (old == 2)
+ if (state & GDK_MOD1_MASK && !(state & GDK_CONTROL_MASK))
+ return 3; // alt
+ return 1;
+ }
+ if (old == 2) {
if (state & GDK_CONTROL_MASK && !(state & GDK_SHIFT_MASK))
return 1; // ctrl
if (state & GDK_CONTROL_MASK && !(state & GDK_SHIFT_MASK))
return 1; // ctrl
- else
- return 2;
+ if (state & GDK_MOD1_MASK && !(state & GDK_SHIFT_MASK))
+ return 3; // alt
+ return 2;
+ }
return old;
}
}
return old;
}
}
if (fabs(force) < 0.002)
force = 0; // snap to zero
do_release(force, modifier);
if (fabs(force) < 0.002)
force = 0; // snap to zero
do_release(force, modifier);
+ current_axis = axis;
dragging = false;
working = false;
dragging = false;
working = false;
- current_axis = axis;
return true;
}
return true;
}
+ dragging = false;
+ working = false;
return false;
}
return false;
}