Fixed two-finger scrolling
This commit is contained in:
@@ -2676,7 +2676,10 @@ static EventState HandleViewportScroll()
|
||||
* outside of the window and should not left-mouse scroll anymore. */
|
||||
if (_last_scroll_window == NULL) _last_scroll_window = FindWindowFromPt(_cursor.pos.x, _cursor.pos.y);
|
||||
|
||||
if (_last_scroll_window == NULL || !((_settings_client.gui.scroll_mode != VSM_MAP_LMB && _right_button_down) || scrollwheel_scrolling || ((_move_pressed || _settings_client.gui.scroll_mode == VSM_MAP_LMB) && _left_button_down))) {
|
||||
if (_last_scroll_window == NULL || !(
|
||||
(_settings_client.gui.scroll_mode != VSM_MAP_LMB && _right_button_down) ||
|
||||
scrollwheel_scrolling ||
|
||||
((_move_pressed || _settings_client.gui.scroll_mode == VSM_MAP_LMB) && (_left_button_down || _right_button_down)))) {
|
||||
_cursor.fix_at = false;
|
||||
_scrolling_viewport = false;
|
||||
_last_scroll_window = NULL;
|
||||
@@ -3166,8 +3169,8 @@ static void MouseLoop(MouseClick click, int mousewheel)
|
||||
return;
|
||||
|
||||
case MC_RIGHT:
|
||||
if (!(w->flags & WF_DISABLE_VP_SCROLL) &&
|
||||
_settings_client.gui.scroll_mode != VSM_MAP_LMB) {
|
||||
if (!(w->flags & WF_DISABLE_VP_SCROLL)) {
|
||||
printf("RMB scroll start\n");
|
||||
_scrolling_viewport = true;
|
||||
_cursor.fix_at = (_settings_client.gui.scroll_mode == VSM_VIEWPORT_RMB_FIXED ||
|
||||
_settings_client.gui.scroll_mode == VSM_MAP_RMB_FIXED);
|
||||
|
||||
Reference in New Issue
Block a user