Commit Graph
38 Commits
Author SHA1 Message Date
Kovid Goyal ade4e67b51 Possible fix for #3890
Try to ensure we have a functioning displaylink always.
GLFW skips over sleeping monitors during a poll and also
had a bug where the display link was not re-created for a monitor
that already had a glfw monitor entry.

Also add a bunch more debug reporting
2021-08-01 12:53:35 +05:30
Danilo Horta 890181172f Fix "Cocoa: Failed to find service port...". 2021-07-28 00:39:50 +01:00
Kovid Goyal 219bf564f7 Fix #3719 2021-06-13 09:07:08 +05:30
Kovid Goyal e4b4a35375 macOS: Fix rendering getting stuck on some machines after sleep/screensaver
This is caused, as far as I can tell, by CVDisplayLink getting stuck.
Apple apparently are incapable of writing a simple timer robustly.
So if it remains stuck after a second delete and recreate it to force it
to restart.

Fixes #2016
2021-05-12 07:30:17 +05:30
Kovid Goyal 0fc93118f2 Make the error message when failing to get monitor display name more informative 2021-01-29 12:45:22 +05:30
Kovid Goyal 68423b3603 Fix compiler warning on newer Xcode
Fixes #3271
2021-01-29 11:29:29 +05:30
Luflosi 0edfa88755 Reduce the difference of GLFW to upstream 2020-10-04 17:34:51 +02:00
Luflosi 6b3f774f05 GLFW: Cocoa: Fix potential leak of CFNumber object
From upstream: https://github.com/glfw/glfw/commit/a2674a903434b7dfc0b0bcc5d0b479da417367ff.
2020-07-24 10:59:04 +02:00
Luflosi 803fba9cfd Cocoa: Replace display link with IOKit query
From upstream: https://github.com/glfw/glfw/commit/4ec7daf3e92440efab8dac7c1f4c60707d990ed0.
2020-05-23 16:28:31 +02:00
Luflosi e725c647ef Cocoa: Only create per-monitor display link once
From upstream: https://github.com/glfw/glfw/commit/b4a8eb9b197caebcec1304cd3d55cd56e3869376.
2020-01-02 18:05:38 +01:00
Luflosi c05cbed5b2 Reduce difference to GLFW upstream 2019-11-23 13:19:06 +01:00
Kovid Goyal 46d49e18c0 More macOS float fixes 2019-09-27 20:07:09 +05:30
Luflosi 28bb123be8 Update the GLFW version number from 3.3 to 3.4
Closes https://github.com/kovidgoyal/kitty/issues/1884.
From https://github.com/glfw/glfw/commit/a337c568486025d22443535b7c047a563bc34373.
2019-08-02 11:00:16 -05:00
Luflosi 489f3e6c9d Add C dialect reminders to each glfw source file
Reduces the difference to upstream.
From https://github.com/glfw/glfw/commit/56aad76b164be741af21688ea3832093c2069cef.
2019-07-20 21:07:27 -05:00
Kovid Goyal 5fef4726a7 Cocoa: Fix file-local function not declared static
From upstream: https://github.com/glfw/glfw/commit/062a1c22b5e346b63fe8dfc09b63f1a57991461a
2019-07-20 19:12:21 +05:30
Luflosi bdc4558a43 Update GLFW copyright years
Reduces the difference to upstream.
From https://github.com/glfw/glfw/commit/ab118b2529a8da3e6b5f847b80ee86bb8c6bf6bb.
2019-07-20 00:30:13 -05:00
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 841c907efc Build glfw with all warnings enabled 2019-07-01 10:42:07 +05:30
Kovid Goyal 9bc288cd8e ... 2019-07-01 08:49:18 +05:30
Kovid Goyal 2ef0391b08 Convert some declarations to C99 style
From upstream: https://github.com/glfw/glfw/commit/0c6b5056196a409e6aac244c983244211abf13b1
2019-07-01 08:32: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 47acc9ff2f Get rid of GLFW_(TRUE|FALSE) 2019-06-08 08:14:30 +05:30
Kovid Goyal fe62700825 Get rid of GLFWbool 2019-06-08 08:12:42 +05:30
Luflosi fbc4d3e1be Remove extra spaces 2019-06-08 00:48:09 +02:00
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 b3f1acd400 Cocoa: Fix coordinate transformations
From upstream: https://github.com/glfw/glfw/commit/3c3981a4f00cdee0f20be6866305715a29b94125
2019-04-18 10:12:41 +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 4c4c6ab0e6 Various fixes for monitor work area retrieval from upstream 2019-03-06 09:08:08 +05:30
Kovid Goyal 0899019518 Add glfwGetMonitorWorkarea
From upstream: https://github.com/glfw/glfw/commit/be295ccbea6a9b1cfdbe0dc700fe04d9be202879
2019-03-06 08:47:01 +05:30
Kovid Goyal aa2b21456f Round refresh rate instead of truncating
From upstream: https://github.com/glfw/glfw/commit/621ece63c8d31ae0dcf2196a3abde19ce8569984
2019-03-06 08:36:59 +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 a1eb236616 Fix glfwGetGammaRamp error handling
https://github.com/glfw/glfw/commit/751c6f9a2792bfc0c09cd381293db21c5a15a9ed
2018-12-28 08:13:28 +05:30
Kovid Goyal 1edf1524f8 Update bundled glfw 2018-03-03 11:21:09 +05:30
Kovid Goyal 77d46630d7 Update bundled glfw 2018-02-08 09:15:40 +05:30
Kovid Goyal 6ad21fc98f Update bundled glfw 2018-01-29 12:30:05 +05:30
Kovid Goyal 9307486254 Initial import of glfw 2017-12-01 12:15:36 +05:30