Make sure the XYWindow doesn't respond to our toggle modifiers.
This commit is contained in:
parent
9152440420
commit
7d04f846c6
2 changed files with 17 additions and 2 deletions
|
@ -173,3 +173,18 @@ ModifierFlags modifiers_for_state(unsigned int state)
|
||||||
}
|
}
|
||||||
return modifiers;
|
return modifiers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ModifierFlags modifiers_for_key(unsigned int state)
|
||||||
|
{
|
||||||
|
ModifierFlags modifiers = c_modifierNone;
|
||||||
|
if (state & GDK_CONTROL_MASK) {
|
||||||
|
modifiers |= c_modifierShift;
|
||||||
|
}
|
||||||
|
if (state & GDK_SHIFT_MASK) {
|
||||||
|
modifiers |= c_modifierControl;
|
||||||
|
}
|
||||||
|
if (state & GDK_MOD1_MASK) {
|
||||||
|
modifiers |= c_modifierAlt;
|
||||||
|
}
|
||||||
|
return modifiers;
|
||||||
|
}
|
||||||
|
|
|
@ -740,7 +740,7 @@ bool XYWnd::chaseMouseMotion(int pointx, int pointy)
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// XYWnd class
|
// XYWnd class
|
||||||
Shader *XYWnd::m_state_selected = 0;
|
Shader *XYWnd::m_state_selected = 0;
|
||||||
|
ModifierFlags modifiers_for_key(unsigned int state);
|
||||||
void xy_update_xor_rectangle(XYWnd &self, rect_t area)
|
void xy_update_xor_rectangle(XYWnd &self, rect_t area)
|
||||||
{
|
{
|
||||||
if (self.GetWidget().visible()) {
|
if (self.GetWidget().visible()) {
|
||||||
|
@ -756,7 +756,7 @@ gboolean xywnd_button_press(ui::Widget widget, GdkEventButton *event, XYWnd *xyw
|
||||||
xywnd->ButtonState_onMouseDown(buttons_for_event_button(event));
|
xywnd->ButtonState_onMouseDown(buttons_for_event_button(event));
|
||||||
|
|
||||||
xywnd->onMouseDown(WindowVector(event->x, event->y), button_for_button(event->button),
|
xywnd->onMouseDown(WindowVector(event->x, event->y), button_for_button(event->button),
|
||||||
modifiers_for_state(event->state));
|
modifiers_for_key(event->state));
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue