(int p)
| 49 | protected boolean events(int p) { |
| 50 | RunLoop.main.shouldSleep.remove(Windows.this); |
| 51 | |
| 52 | if (events.size() > 0) Log.log("event.debug", () -> "events :" + events.size()); |
| 53 | while (!events.isEmpty()) { |
| 54 | try { |
| 55 | events.removeFirst() |
| 56 | .run(); |
| 57 | } catch (Throwable t) { |
| 58 | Log.log("events.error", () -> "Exception thrown while handling event :" + t); |
| 59 | t.printStackTrace(); |
| 60 | } |
| 61 | } |
| 62 | return true; |
| 63 | } |
| 64 | |
| 65 | public void init() { |
| 66 | // this is already done once in the singleton constructor |
| 67 | } |
| 68 |