Commit Graph
971 Commits
Author SHA1 Message Date
Luflosi 48fb051253 Add GLFW_RAW_INPUT and glfwRawInputSupported
From upstream: https://github.com/glfw/glfw/commit/9e29f556fd78196dfc81aeb73657888fc0a6d68d.
2020-05-24 20:49:52 +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 7931654a7c Ensure valid UTF-8 when cutting string 2020-05-23 13:59:23 +02:00
Luflosi 269f294d19 Use CALayer instead of NSView for EGLNativeWindowType
From upstream: https://github.com/glfw/glfw/commit/91eebe922de06a3ed4ba6622686c436c7941aa63.
2020-05-23 12:48:26 +02:00
Luflosi 3b745b82db X11: Clarify function name and comment
From upstream: https://github.com/glfw/glfw/commit/5f9dfe3d83af4d6b95c2e4f19adadc334eb314ae.
2020-05-23 11:34:17 +02:00
Luflosi 9da0ba52db X11: Clarify code flow for Clang static analysis
From upstream: https://github.com/glfw/glfw/commit/ef5220d6b10174d0f7cce965475e34527afcfbcf.
2020-05-22 23:32:12 +02:00
Luflosi 7441cefdbb Make paths to libraries configurable at build time 2020-05-19 18:36:46 +02:00
Kovid Goyal 707cb37212 Have the confirm on close also apply to quitting kitty
Use a dedicated API for handling quit requests on macOS rather than a
quit canary. Also create a mappable "quit" action for all platforms.
2020-05-18 16:06:40 +05:30
Kovid Goyal 2e63a4c83f Wayland: Remove unused link-time dependency
https://github.com/glfw/glfw/commit/6aca3e99f03617df1dd9081f20bd5408baf2a5d6
2020-05-01 15:00:38 +05:30
Kovid Goyal 9da5bee178 X11: Filter out Xlib errors from other connections
https://github.com/glfw/glfw/commit/2c8e0512ddb1e8baa73c5b8a03a79aedb4e5939d
2020-05-01 14:59:16 +05:30
Kovid Goyal 2fc6f3b542 Merge changes from upstream
https://github.com/glfw/glfw/commit/e65de2941c056ee5833b4dab3db36b297b53aa14
2020-05-01 14:57:55 +05:30
Kovid Goyal aa9c3cd634 Report modifier key state when sending wheel events to the terminal program 2020-04-29 20:02:55 +05:30
James McCoy 0dff0d03f9 Use -fPIC instead of -fpic
With large objects, use of -fpic will fail to link on certain
architectures due to size limitations of the global offset table (GOT).
For example, the link stage for glfw-wayland.so fails on sparc64, as
below.  Using -fPIC avoids these size limitations.

    ./glfw/osmesa_context.c:73:(.text+0xf2c): relocation truncated to fit: R_SPARC_GOT13 against symbol `_glfw' defined in .bss section in /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o
    /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o: in function `swapIntervalEGL':
    ./glfw/egl_context.c:238:(.text+0xf68): relocation truncated to fit: R_SPARC_GOT13 against symbol `_glfw' defined in .bss section in /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o
    /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o: in function `destroyContextOSMesa':
    ./glfw/osmesa_context.c:80:(.text+0x10a4): relocation truncated to fit: R_SPARC_GOT13 against symbol `_glfw' defined in .bss section in /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o
    /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o: in function `data_offer_action':
    ./glfw/wl_window.c:1692:(.text+0x15e4): relocation truncated to fit: R_SPARC_GOT13 against symbol `_glfw' defined in .bss section in /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o
    /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o: in function `data_offer_source_actions':
    ./glfw/wl_window.c:1683:(.text+0x1648): relocation truncated to fit: R_SPARC_GOT13 against symbol `_glfw' defined in .bss section in /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o
    /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o: in function `keyboardHandleRepeatInfo':
    ./glfw/wl_init.c:471:(.text+0x1704): relocation truncated to fit: R_SPARC_GOT13 against symbol `_glfw' defined in .bss section in /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o
    /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o: in function `checkScaleChange':
    ./glfw/wl_window.c:55:(.text+0x1768): relocation truncated to fit: R_SPARC_GOT13 against symbol `_glfw' defined in .bss section in /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o
    /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o: in function `primary_selection_copy_callback_done':
    ./glfw/wl_window.c:1833:(.text+0x18bc): relocation truncated to fit: R_SPARC_GOT13 against symbol `_glfw' defined in .bss section in /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o
    /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o: in function `clipboard_copy_callback_done':
    ./glfw/wl_window.c:1825:(.text+0x1910): relocation truncated to fit: R_SPARC_GOT13 against symbol `_glfw' defined in .bss section in /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o
    /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o: in function `primary_selection_source_canceled':
    ./glfw/wl_window.c:1582:(.text+0x1968): relocation truncated to fit: R_SPARC_GOT13 against symbol `_glfw' defined in .bss section in /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o
    /tmp/glfw-wayland.so.SYvdxr.ltrans0.ltrans.o: in function `data_source_canceled':
    ./glfw/wl_window.c:1576:(.text+0x19c0): additional relocation overflows omitted from the output
    collect2: error: ld returned 1 exit status
2020-04-25 10:08:28 -04:00
Kovid Goyal 601cf01222 Fix #2581 2020-04-24 19:24:11 +05:30
Trygve Aaberge 2e3f9dffa7 Ignore keys for switching keyboard layout
XKB has various options for using keys to switch the keyboard layout.
When these are set, XKB will return keysyms which are unknown to GLFW,
so kitty will fallback to using a keymap without the options set, which
causes the keys to be interpreted as the original keysyms.

However, when these options are set, kitty shouldn't interpret the keys.
Therefore, check for some specific keysyms and return before translating
to GLFW keysyms.

There may be more keysyms which should be ignored, but as far as I can
see from https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/xkeyboard-config-2.29/symbols/group
these are the ones which can be triggered by XKB options.

Fixes #2519
2020-04-10 17:21:53 +02:00
Kovid Goyal 759a15ccbb X11: Handle invalid data being sent with drag events by some applications
Fixes #2505
2020-04-02 21:01:19 +05:30
Kovid Goyal 76a6bba643 Fix #2466 2020-03-24 17:07:37 +05:30
Kovid Goyal 372d2008a6 Actually, we should use text/plain rather than text/uri-list since we are already converting to filesystem paths 2020-03-19 13:40:02 +05:30
Kovid Goyal ab9a36f8c1 Port cocoa backend to use new drop API 2020-03-19 13:36:03 +05:30
Kovid Goyal 2458c3a7c6 Implement drag and drop of text/plain for Wayland as well 2020-03-19 13:28:21 +05:30
Kovid Goyal e827e6fa21 X11: Allow drag and drop of text/plain in addition to text/uri-list
Fixes #2441
2020-03-18 22:37:23 +05:30
Kovid Goyal 5956277863 All defs are now typed 2020-03-14 14:37:11 +05:30
Kovid Goyal eb12511646 The uber-fussy sway does not like calling wl_data_offer_finish on a version 1 data manager 2020-03-14 09:12:06 +05:30
Kovid Goyal aa11ddf32c Wayland: Fix a crash when drag and dropping into kitty
Fixes #2432
2020-03-14 08:20:44 +05:30
Kovid Goyal 8a34fede55 More typing work 2020-03-06 08:35:23 +05:30
Kovid Goyal 6609d219f4 Add type checking for glfw module as well 2020-03-06 07:59:55 +05:30
Kovid Goyal 56e5c8be32 macOS: When switching inpt method while a pending multi-key input is in progress, clear the pending input
Fixes #2358
2020-02-17 15:30:03 +05:30
Luflosi f8ae048d60 X11: Fix setting the clipboard string to itself
From upstream: https://github.com/glfw/glfw/commit/0c27ed1d0ef36672f0ef28d86bf8e108cc6e379d.
2020-02-17 01:12:52 +01:00
Luflosi 90a8ba3789 Fix typo in comment 2020-02-15 18:52:18 +01:00
Kovid Goyal b235f411b0 X11: Fix arrow mouse cursor using right pointing instead of the default left pointing arrow
Fixes #2341
2020-02-06 21:11:09 +05:30
Kovid Goyal 8f1ec053ef ... 2020-01-27 08:50:29 +05:30
Kovid Goyal 2e3037ce3a Wayland: Fix window titles being set to very long strings on the order of 8KB causing a crash
Fixes #1526
2020-01-27 08:49:25 +05:30
Kovid Goyal 1b5daf930a Make the comment explaining wayland polling more detailed 2020-01-23 15:08:54 +05:30
Kovid Goyal 748ca81d4b Wayland: Fix a freeze in rare circumstances when having multiple OS Windows
Fixes #2307
Fixes #1722
2020-01-23 15:07:22 +05:30
Luflosi e4fd12001c Cocoa: Add fully dynamic loading of Vulkan loader
From upstream: https://github.com/glfw/glfw/commit/7da87aaae7039cbdc132f8f563a2603c5e3c73a1.
2020-01-17 14:18:28 +01:00
Luflosi 3581ffe04b Cocoa: Select Vulkan surface extension at runtime
From upstream: https://github.com/glfw/glfw/commit/15d91801b7ac3d52779ec7330f2a1c0128fb57df.
2020-01-17 14:18:21 +01:00
Luflosi f6901e4a3d Cocoa: Add support for VK_EXT_metal_surface
From upstream: https://github.com/glfw/glfw/commit/c5cb4a253a9c304b136cac01a378567dc46e0320.
2020-01-17 14:18:05 +01:00
Luflosi ed9f9db1b0 X11: Fix parent window handle initialization
From upstream: https://github.com/glfw/glfw/commit/9372ba95faabd1bb45280d201d6ccdae77bf872e.
2020-01-15 13:19:33 +01:00
Luflosi 74bed658e1 X11: Fix no window position events during resize
From upstream: https://github.com/glfw/glfw/commit/fe57e3c2921a1901390534e1e51053df70b5644b.
2020-01-15 13:19:32 +01:00
Kovid Goyal c68b302fa2 Merge branch 'wayland' of https://github.com/kennylevinsen/kitty 2020-01-15 06:51:24 +05:30
Kenny Levinsen ca7cab1a2d wayland: Consistently use errno for errors 2020-01-14 20:06:13 +01:00
Kenny Levinsen 083b294659 wayland: Simplify dispatch_pending error handling
wl_display_dispatch_pending does not return EAGAIN, and always sets an
error when it fails. This allows us to handle errors in a simpler
manner.
2020-01-14 20:04:23 +01:00
Kenny Levinsen bc24716476 wayland: errno does not have to be cleared
As long as errno is only read on error from an errno-setting function,
then there is no need to reset errno between uses.
2020-01-14 20:04:23 +01:00
Kenny Levinsen 4acab65016 wayland: Only cancel display read after prepare success
The display reader count only increments when wl_display_prepare_read
succeeds.  Calling wl_display_cancel_read when wl_display_prepare_read
has not succeeded results in a negative reader count, which does not
have well-defined behavior.
2020-01-14 20:00:47 +01:00
Kenny Levinsen f6b03f106c wayland: Cancel display read before abortOnFatalError
Calling wl_display_cancel_read immediately ensures that other readers
waiting on us will have a chance to wake up and discover the error in a
timely manner.
2020-01-14 19:59:02 +01:00
Kovid Goyal ac72ac7af2 Wayland: On dispatch error cancel read before running fatal error handlers
Might help #1722
2020-01-14 19:48:28 +05:30
Luflosi 053de5763a X11: Fix BadMatch focusing a window on non-EWMH WM
From upstream: https://github.com/glfw/glfw/commit/aa5e31356178de43d42f43f48914a62c25033f4b.
2020-01-08 19:50:17 +01:00
Kovid Goyal 321771b150 Merge branch 'resize-by-increments' of https://github.com/aes/kitty 2020-01-07 10:44:55 +05:30
Luflosi b9a08eacb0 X11: Cleanup
From upstream: https://github.com/glfw/glfw/commit/8149a5fc00e63ff1e94228f338f1a27de374c68b.
2020-01-03 02:37:19 +01: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