Skip to content

Commit f2c8c6b

Browse files
SmallJokerlhofhansl
authored andcommittedDec 14, 2020
Revert "GUIFormSpecMenu: Shift+Click listring workaround for MacOS"
The commit caused Shift-Clicking issues on Linux due to another Irrlicht bug where KeyInput.Shift released keys do not trigger OnEvent() MacOS users should build using a recent Irrlicht 1.8 development version. See also: https://sourceforge.net/p/irrlicht/patches/321/
1 parent e18b6c5 commit f2c8c6b

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed
 

Diff for: ‎src/gui/guiFormSpecMenu.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -4075,9 +4075,6 @@ enum ButtonEventType : u8
40754075

40764076
bool GUIFormSpecMenu::OnEvent(const SEvent& event)
40774077
{
4078-
// WORKAROUND: event.MouseInput.Shift is not implemented for MacOS
4079-
static thread_local bool is_shift_down = false;
4080-
40814078
if (event.EventType==EET_KEY_INPUT_EVENT) {
40824079
KeyPress kp(event.KeyInput);
40834080
if (event.KeyInput.PressedDown && (
@@ -4087,8 +4084,6 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
40874084
return true;
40884085
}
40894086

4090-
is_shift_down = event.KeyInput.Shift;
4091-
40924087
if (m_client != NULL && event.KeyInput.PressedDown &&
40934088
(kp == getKeySetting("keymap_screenshot"))) {
40944089
m_client->makeScreenshot();
@@ -4138,9 +4133,6 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
41384133
event.MouseInput.isRightPressed() &&
41394134
getItemAtPos(m_pointer).i != getItemAtPos(m_old_pointer).i))) {
41404135

4141-
// WORKAROUND: In case shift was pressed prior showing the formspec
4142-
is_shift_down |= event.MouseInput.Shift;
4143-
41444136
// Get selected item and hovered/clicked item (s)
41454137

41464138
m_old_tooltip_id = -1;
@@ -4271,7 +4263,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
42714263
else // left
42724264
count = s_count;
42734265

4274-
if (!is_shift_down) {
4266+
if (!event.MouseInput.Shift) {
42754267
// no shift: select item
42764268
m_selected_amount = count;
42774269
m_selected_dragging = button != BET_WHEEL_DOWN;

0 commit comments

Comments
 (0)