Kovid Goyal
1cb15dedac
Simplify the event loop code
...
Also reduce input latency by ignoring repaint_delay when
there is actual pending input.
Gets rid of request_tick_callback(). Now empty events
result in the tick callback being called so there is only a
single mechanism for waking up the main loop and getting
the tick callback called.
2019-07-18 15:51:54 +05:30
Kovid Goyal
39f6071c68
macOS: Fix a deadlock with CVDisplayLink
...
I had added an optimization to not pass messages to
main thread every time the CVDisplayLink timer fired, unless
a render frame for that monitor was actually requested.
However, this optimization is impossible to implement wihtout a deadlock
since CVDisplayLink has its own internal lock that it does not expose.
So I guess macOS users with multiple monitors will simply have to take
the performance hit of useless wakeups sixty times a second for every
extra monitor.
Fixes #1779
2019-07-05 20:16:32 +05:30
Kovid Goyal
8c9d2d3ca2
macOS: Reduce energy consumption when idle by shutting down Apple's display link thread after 30 second of inactivity
...
Fixes #1763
2019-06-29 14:21:47 +05:30
Kovid Goyal
86305fdeb3
Use CVDisplayLinkIsRunning() rather than tracking started state since the OS can apparently shutdown the thread on its own in some scenarios
2019-06-28 17:46:59 +05:30
Luflosi
8ffc841a3a
Reduce the difference of glfw/cocoa_* to upstream
...
This only changes some formatting, whitespace, etc.. There are no
changes to the functionality.
Let me know if you don't like some of those changes.
2019-06-21 15:53:26 +02:00
Kovid Goyal
fe62700825
Get rid of GLFWbool
2019-06-08 08:12:42 +05:30
Kovid Goyal
abf9c4117d
macOS: Fix a regression that could cause rendering of a kitty window to occasionally freeze in certain situations, such as moving it between monitors or transitioning from/to fullscreen
...
Fixes #1641
2019-05-28 17:54:34 +05:30
Kovid Goyal
4fff84b4b9
Add void to all function declarations for functions that take no arguments
...
Micro-optimization for some architectures. Enforced via
-Wstrict-prototypes
2019-05-13 11:04:21 +05:30
Kovid Goyal
b10312e249
Upstream fixes for vulkan surface creation and the retina hint
...
e108c0de0d
980fc9b52f
2019-03-28 13:09:22 +05:30
Kovid Goyal
c4e89d9d0c
macOS: Consolidate compatibility macros for old SDKs in one place
2019-03-28 12:37:05 +05:30
Kovid Goyal
fcb26e5dc7
Cocoa: User performSelectorOnMainLoop for render frames as well which means render frames work during modal loops
2019-03-21 16:51:01 +05:30
Kovid Goyal
0dc6ac26c3
Cocoa: user performSelectorOnMainThread instead of postEvent for the tick callback
...
performSelectorOnMainThread runs in more loop run modes which means that
the tick callback will behave more like it does on other platforms,
during window resizes and other modal event loops.
2019-03-21 15:55:43 +05:30
Kovid Goyal
4c4c6ab0e6
Various fixes for monitor work area retrieval from upstream
2019-03-06 09:08:08 +05:30
Kovid Goyal
f0a2c34eca
Port cocoa backed to use glfw mainloop
2019-03-04 19:52:46 +05:30
Kovid Goyal
4629ef627f
GLFW: Add support for render frames on Cocoa (CVDisplayLink)
...
Allows vsync to work again since Apple broke OpenGL swap intervals on
Mojave
2019-02-20 15:08:07 +05:30
Kovid Goyal
23482e3cf4
macOS: Allow assigning only the left or right :kbd:Option key to work as the :kbd:Alt key. See :opt:macos_option_as_alt for details
...
Fixes #1022
2019-02-14 20:39:32 +05:30
Kovid Goyal
fe67e3dde7
Cocoa: Remove subclassing of NSApplication
...
From upstream: 88c5edb409
2018-12-26 12:29:38 +05:30
Kovid Goyal
8395076da5
Cocoa: Cleanup
...
From upstream
2018-10-25 10:32:17 +05:30
Kovid Goyal
ec1f219850
macOS: Make full screening of kitty much faster by using the "traditional full screen" mode of cocoa, similar to iTerm and MacVim
...
Hopefully workaround a bug in glfw that causes crashes when unplugging
monitors with full screen windows.
Fixes #911
Fixes #898
2018-09-12 15:45:08 +05:30
Kovid Goyal
45b0233f60
Update GLFW from upstream
...
Use the new init hint for keyboard debugging
2018-06-22 13:26:41 +05:30
Kovid Goyal
faa5443d43
macOS: When clicking dock icon with no windows, create a new window
2018-06-07 07:19:39 +05:30
Kovid Goyal
32f16ee5f5
macOS: Add support for dead keys
...
I have modified GLFW to support dead keys on macOS. That was painful.
Fixes #465
2018-04-20 14:25:53 +05:30
Kovid Goyal
2504266806
macOS: Fix option as alt not working for keys that act as dead keys in the current keyboard layout
2018-04-19 17:44:31 +05:30
Kovid Goyal
b59d7dda11
Import glfw from upstream, key handling on macOS works again
2018-03-31 12:21:37 +05:30
Kovid Goyal
77d46630d7
Update bundled glfw
2018-02-08 09:15:40 +05:30
Kovid Goyal
d43d6ab0a9
Update bundled glfw
2018-01-12 05:34:53 +05:30
Kovid Goyal
9307486254
Initial import of glfw
2017-12-01 12:15:36 +05:30