Commit Graph
749 Commits
Author SHA1 Message Date
Kovid Goyal a51239c6ae Add support for the underscore key found in some keyboard layouts
Fixes #1639
2019-05-24 17:59:50 +05:30
Luflosi 05f01525c3 Revert "macOS: Fix cocoa mouse y-coord off by one"
This reverts commit 8969206450.
Fixes #1621.
When committing b3f1acd400, applying the glfw upstream patch https://github.com/glfw/glfw/commit/3c3981a4f00cdee0f20be6866305715a29b94125 for https://github.com/glfw/glfw/issues/1461, this commit should have been reverted as it was just a quick fix for https://github.com/glfw/glfw/issues/1461.
2019-05-21 19:31:57 +02:00
Luflosi a792c94ccf Use python3 shebang for all python scripts
Fixes #1624.
Use python3 shebang for all python scripts as python still defaults to python2 on many systems.
2019-05-20 14:44:24 +02:00
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 3e964163c0 Pass zero for fullscreen flags on non Cocoa platforms 2019-05-12 16:07:54 +05:30
Kovid Goyal c95d3b19b3 X11 backend: Get rid of override redirect
Was used for hackish fullscreen, which we no longer support
2019-05-12 15:59:16 +05:30
Kovid Goyal 1fa9b8f102 X11: use the window manager's native full-screen implementation when making windows full-screen
This matches the behavior on Cocoa and Wayland.
Fixes #1605
2019-05-12 15:53:06 +05:30
Kovid Goyal ad672fc9d6 Wayland: Remove wl_shell support
From upstream: https://github.com/glfw/glfw/commit/599fb3de348f73134b4e9d2ee5cabc62ca0b84ab
2019-05-11 17:50:02 +05:30
Kovid Goyal a0f298ddb0 ... 2019-05-11 16:35:48 +05:30
Kovid Goyal a3f9835b7b X11 backend: Improve performance when handling consecutive XkbKeyMap events
Only recompile the keymap when actually needed, greatly improving
performance when the X server sends multiple consecutive key map events.
Fixes #1606
2019-05-11 13:39:05 +05:30
Kovid Goyal 268e5cef3b Remove useless else 2019-05-03 13:37:57 +05:30
Kovid Goyal f0c663d42d macOS: Improve handling of IME extended input
Compose characters are now highlighted and the IME panel moves along with the text

Fixes #1586
Fixes #1461
2019-05-03 13:30:56 +05:30
BlahGeek e36e44ab3a macOS: do not pass input events while having marked text
fix chinese input method backspacing issue

macOS: Set pre-edit text for IME

macOS: implement glfwPlatformUpdateIMEState

set firstRectForCharacterRange correctly

macOS: update IME position on each input

macOS: use float instead of int for updateIMEState

minor fix

macOS: ignore marked text on deadkey

fixes german keyboard input

macOS: convert markedRect to screen coord
2019-05-03 13:27:06 +05:30
Kovid Goyal 408cd9cf9b Wayland: Only print out window attention error once 2019-04-27 14:53:31 +05:30
Kovid Goyal 8b47e63136 Wayland backend: Dont roundtrip to the server just to wakeup the main loop 2019-04-27 14:52:15 +05:30
Kovid Goyal 379ec88776 Only use the tick callback mechanism on macOS
On Linux, just call the tick callback on every loop tick. This is much
simpler, and should fix the issue with screen updates sometimes getting
stuck waiting for an X11 event.

Note that this was what used to happen (global state being checked on
every loop tick) before the refactoring to use a GLFW event loop,
therefore there should be no performance regressions, though we
of course end up checking global state on every group of events on
Linux, instead of only when something of interest happens. I suspect, to
achieve the latter is going to require implementing a mutex/lock in the
main loop to avoid races, which doesn't seem worth it.
2019-04-27 14:40:09 +05:30
Kovid Goyal a320e8bc25 When debuggin event loop display number of dispatched X11 events 2019-04-27 13:52:44 +05:30
Kovid Goyal 0987a536b1 Add extra logging to debug the event loop
This should make tracking down the root cause of the
event loop pauses on X11 easier. And the infrastructure
should come in handy in the future as well.
2019-04-24 16:16:40 +05:30
Kovid Goyal b6267d4a8c X11 backend: Get rid of server roundtrip just to wake up the event loop 2019-04-24 13:42:26 +05:30
Kovid Goyal 2df97e309b X11 backend: Dispatch X11 events after XFlush 2019-04-24 06:25:00 +05:30
Kovid Goyal ef86f8a20c NSGL: Disable swap interval
Swap interval now uses CVDisplayLink.
From upstream: https://github.com/glfw/glfw/commit/28f118f4de1af12e0abb516459f1d2318e1710c8
2019-04-18 10:14:29 +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 5c4462281e Cocoa: Upstream fix for mouse hover detection
https://github.com/glfw/glfw/commit/0e74265426591a9b1e61deef224f920e3b54fd01
2019-04-18 09:58:09 +05:30
Kovid Goyal 8969206450 macOS: Fix cocoa mouse y-coord off by one
See https://github.com/glfw/glfw/issues/1461
2019-04-09 22:02:36 +05:30
Kovid Goyal 41318d763b Fix missing context APIs in version strings 2019-04-09 10:06:10 +05:30
Kovid Goyal 8251b906b6 Add a listener for GPU changed events on macOS
Currently does nothing, but could potentially be used to fix:
https://github.com/kovidgoyal/kitty/issues/794

Will need someone with the hardware though to test
exactly what needs to be done to restore the custom cursor image.
2019-04-06 10:05:21 +05:30
Kovid Goyal b10312e249 Upstream fixes for vulkan surface creation and the retina hint
https://github.com/glfw/glfw/commit/e108c0de0d531123b560931c07c5a226e7d7a3da
https://github.com/glfw/glfw/commit/980fc9b52f397ec54ce65f69abe9ff694622b4ab
2019-03-28 13:09:22 +05:30
Kovid Goyal 6f3a9d6d29 macOS: Remove check for pre-10.8 SDK 2019-03-28 12:42:14 +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 ecf2c86787 Wayland: Abort on fatal display errors instead of looping forever 2019-03-22 08:53:10 +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 48303bac75 Use "arrow" as the arrow cursor on Linux
Different themes preferentiallyuse left_prt or right_ptr, so use arrow
instead
2019-03-21 13:22:13 +05:30
Kovid Goyal 5ab8a665be GLFW: Add more standard cursor shapes
Also use an enum for the cursor shapes
2019-03-21 13:06:13 +05:30
Kovid Goyal 733158a2de Better error reporting when failing to load cursor 2019-03-21 10:38:26 +05:30
Kovid Goyal a2e47d2d0e EGL: Warn if non-blocking swap buffers is not available 2019-03-21 09:46:46 +05:30
Kovid Goyal bfb97a6e6f Wayland: use correct name for hand cursor 2019-03-21 09:24:51 +05:30
Kovid Goyal 106dc2b03b Wayland: Load cursor theme at init even if no mouse pointer is currently present 2019-03-20 15:56:34 +05:30
Kovid Goyal 7d9d096fbf Rationalize change reporting after configure event on Wayland
Fixes #1482 (I hope)
2019-03-19 15:02:11 +05:30
Kovid Goyal c129dd9331 Wayland: Ignore invalid scale values from compositor 2019-03-19 14:30:43 +05:30
Kovid Goyal 5c75ac0a96 GLFW Wayland backend: Dont fire resize events for Wayland configure events that dont change the window size. Fixes #1473 2019-03-17 15:07:32 +05:30
Kovid Goyal e9e4ac13ee Fix #1472 2019-03-16 07:37:36 +05:30
Kovid Goyal d3cee832ce Wayland: Dont try to focus window on create/show since it is not allowed anyway 2019-03-07 18:14:12 +05:30
Kovid Goyal 7ab63525c7 Dont use a global autorelease variable
Use function local @autorelease blocks instead
2019-03-06 09:34:55 +05:30
Kovid Goyal a1c49a0f7f Cocoa: Disable shadow for transparent framebuffer
From upstream: https://github.com/glfw/glfw/commit/9883cb64f0d55770bf09d2a79f044ba2049ea3e2
2019-03-06 09:12:16 +05:30
Kovid Goyal 4c4c6ab0e6 Various fixes for monitor work area retrieval from upstream 2019-03-06 09:08:08 +05:30
Kovid Goyal 2e0d39b512 Remove windows glfw backend as it is unused 2019-03-06 08:47:45 +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 db16996181 Fix Coverity Scan false positive
From upstream: https://github.com/glfw/glfw/commit/c20754c4a65784f46519397cee285018670d2cfb
2019-03-06 08:40:02 +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