Commit Graph
749 Commits
Author SHA1 Message Date
Kovid Goyal 9a97f0bced X11: Further reduce startup time
Use the GLX 1.3 API function to choose the best framebuffer config
instead of doing it ourselves. Reduces the number fo getpid() calls by
a further ~15K
2020-06-09 20:18:07 +05:30
Kovid Goyal 27b6517594 X11: Reduce startup time by ~25% by only querying GLX for framebuffer configurations once
On my system reduces the number of getpid() calls from 67982 to 17327
I dont know why get framebuffer config attributes requires getpid() and
why it is so slow, probably a driver bug. Fixes #2754
2020-06-09 01:04:09 +05:30
Luflosi e2be09e028 Remove GLFW_TRUE in comment
In 55ad228166 I forgot to replace `GLFW_TRUE` with `true` in a comment.
2020-06-05 18:51:50 +02:00
Kovid Goyal c7c14f184c X11: Recompile keymaps on XkbNewKeyboardNotify events
Hopefully fixes #2726
2020-06-05 22:11:15 +05:30
Luflosi d8886edbeb Null: Make platform more conformant
From upstream: https://github.com/glfw/glfw/commit/e0c77f71f90e3bb8495c5c88fb0fb054d71cf7fc.
2020-06-05 00:27:47 +02:00
Luflosi 5263f6598c Add feature available/implemented errors
From upstream: https://github.com/glfw/glfw/commit/9a87c2a4b49808d3666c7b093b77e8512fa23908.
2020-06-04 13:55:52 +02:00
Luflosi c70e2f7d3e Add statement to docs for glfwTerminate
From upstream: https://github.com/glfw/glfw/commit/7486e12f88b2a9039b805356bcbe259c0fca5c2d.
2020-06-03 20:07:09 +02:00
Luflosi 46b5e4513a Win32: Fix VS /W4 compile warnings
From upstream: https://github.com/glfw/glfw/commit/a84a30ab6399eedd4606da226fe4f02eab3c2d2e.
2020-06-03 19:05:05 +02:00
Luflosi 107f1af3c4 Fix desktop GL header not always being suppressed
From upstream: https://github.com/glfw/glfw/commit/105cf32e0b05e207d4cd5efa462887569ca2116a.
2020-06-03 11:32:59 +02:00
Kovid Goyal 03b1484c96 Wayland: Abort on fatal error should bypass quit confirmation 2020-06-03 14:39:27 +05:30
Luflosi 767da68239 Reduce difference to GLFW upstream
Only whitespace, formatting and comments were changed. This does not alter any functionality.
2020-06-02 11:45:08 +02:00
TheDaemoness 7f226f2ea1 Avoid incrementing hidden cursors' images 2020-06-02 05:10:51 +00:00
Kovid Goyal 1c82a39a6e Merge branch 'glfw_upstream' of https://github.com/Luflosi/kitty 2020-06-02 08:13:33 +05:30
Kovid Goyal b70cf276b4 Change the cursor image immediately on scale change 2020-06-02 08:09:27 +05:30
Kovid Goyal 80b2df2ef4 Better code when using a stack cursor 2020-06-02 07:59:32 +05:30
Kovid Goyal ad27452275 Wayland: Avoid infinite timer fires if arrow cursor is animated 2020-06-02 07:53:15 +05:30
Luflosi f356f63994 wayland: save serial from all input sources
From upstream: https://github.com/glfw/glfw/commit/92b3fd02e58c5422c60f4f52499189e727969564.
2020-06-01 21:29:14 +02:00
TheDaemoness 4947fb6b57 Fix a missing cursorWayland-scale assignment. 2020-06-01 17:41:16 +00:00
Kovid Goyal c1f84ce603 cleanup for wayland hidpi cursors merge 2020-06-01 21:14:56 +05:30
Kovid Goyal 14912461ad Use left_ptr as default arrow cursor on Wayland
Matches X11.
2020-06-01 20:33:54 +05:30
Kovid Goyal a9f265e8b7 Initialize a couple of local vars 2020-06-01 20:33:54 +05:30
TheDaemoness 199ee20adb Fixed an instance of eager cursor loading.
Also fixed a minor formatting issue.
2020-06-01 20:33:53 +05:30
TheDaemoness 7c3c87abf6 Initial implementation of proper HiDPI cursor support on Wayland. 2020-06-01 20:33:53 +05:30
Luflosi 3846286bee Wayland: Implement raw mouse motion control
From upstream: https://github.com/glfw/glfw/commit/44af6bb9360df274b514f958f9a6a52a93c7fe32.
2020-05-25 18:21:32 +02:00
Luflosi c6b9cb759a Wayland: Rename handlers for more unicity
From upstream: https://github.com/glfw/glfw/commit/754b7feaa144b22383457f9c0561adc9ebb24fd7.

1fa66ca45d didn't include the changes to `wl_window.c`.
2020-05-25 15:29:17 +02:00
Luflosi fcc7a0255a Align joystick axis to gamepad button behavior
From upstream: https://github.com/glfw/glfw/commit/02874d9c148cf549abc403e07856d7531f4fcce6.
2020-05-25 11:44:14 +02:00
Luflosi e7447f38cf Fix half-axis to gamepad button value mapping
From upstream: https://github.com/glfw/glfw/commit/c32dc3a0856e339d8de582582fcbedec430e14b4.
2020-05-25 11:44:02 +02:00
Luflosi 55ad228166 Rename raw input to raw mouse motion, cleanup
From upstream: https://github.com/glfw/glfw/commit/1155c83013d0f8b86d5a56193708dc00d6c53553.
2020-05-24 21:57:29 +02:00
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