[core/input] Move from select to epoll

Use epoll instead of select in order to be able to use level-triggered
semantics and not get stuck on the first event.
This commit is contained in:
Tobi-wan Kenobi 2016-12-17 07:43:38 +01:00
parent 31f9154be2
commit f6be25bc73
11 changed files with 67 additions and 48 deletions

View file

@ -24,7 +24,7 @@ class TestBrightnessModule(unittest.TestCase):
for widget in self.module.widgets():
self.assertEquals(len(widget.full_text()), len("100%"))
@mock.patch("select.select")
@mock.patch("select.epoll")
@mock.patch("subprocess.Popen")
@mock.patch("sys.stdin")
def test_wheel_up(self, mock_input, mock_output, mock_select):
@ -33,7 +33,7 @@ class TestBrightnessModule(unittest.TestCase):
"xbacklight +2%"
)
@mock.patch("select.select")
@mock.patch("select.epoll")
@mock.patch("subprocess.Popen")
@mock.patch("sys.stdin")
def test_wheel_down(self, mock_input, mock_output, mock_select):
@ -42,7 +42,7 @@ class TestBrightnessModule(unittest.TestCase):
"xbacklight -2%"
)
@mock.patch("select.select")
@mock.patch("select.epoll")
@mock.patch("subprocess.Popen")
@mock.patch("sys.stdin")
def test_custom_step(self, mock_input, mock_output, mock_select):