Commit Graph
67 Commits
Author SHA1 Message Date
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 51fdb8200a X11: Fix focus events not being filtered
From upstream: https://github.com/glfw/glfw/commit/c6b95e3b07b9c20d9adae2ddebf69706540180de
2019-07-20 19:11:00 +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 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 7e36489034 Dont call detect joysticks if support for them has been disabled 2019-07-08 11:18:00 +05:30
Kovid Goyal d259b12ae7 Micro-optimization: Avoid repeated calls to XQLength 2019-07-08 11:05:04 +05:30
Kovid Goyal 0fb1481038 Move event loop wakeup code into backend_utils 2019-07-05 09:34:51 +05:30
Kovid Goyal 841c907efc Build glfw with all warnings enabled 2019-07-01 10:42:07 +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 a491a801bf X11: Let the language initialize XEvent structs
From upstream: https://github.com/glfw/glfw/commit/1f508530f0cda2db78404a82fba1b956372e67aa
2019-07-01 05:47:04 +05:30
Luflosi bada795320 Reduce the difference of glfw/x11_* to glfw 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-11 17:57:39 +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
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 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 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 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 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 1902d8bb19 Explicitly handle the empty events on X11 2019-03-04 19:52:45 +05:30
Kovid Goyal dcb2d95f9a GLFW: Add support for window occluded notifications on macOS
Based on: https://github.com/glfw/glfw/pull/1123
2019-02-18 10:03:21 +05:30
Kovid Goyal 869152750c X11: Fix system cursor used for GLFW_HAND_CURSOR
From upstream: https://github.com/glfw/glfw/commit/2a27eb95e42ddc880fa1fdb18872d2c892bd36c1
2019-02-17 10:21:15 +05:30
Kovid Goyal 22b756753a X11: Fix EWMH state update for hidden windows
From upstream: https://github.com/glfw/glfw/commit/78e6a0063d27ed44c2c4805606309744f6fb29fc
2019-02-03 20:09:18 +05:30
Kovid Goyal cb7eb48768 Cleanup
From upstream: https://github.com/glfw/glfw/commit/d5ab3e919a4f163f4010f7112a9cf1bdcd80f805
2019-02-03 20:04:54 +05:30
Kovid Goyal 419b078104 Remove duplicate centerCursor function
From upstream: https://github.com/glfw/glfw/commit/a46104ee69360ee73d59cfd397a7f1b23d751b77
2019-02-03 19:56:16 +05:30
Kovid Goyal cffaa54a78 Forgot to dispatch events on the dbus session bus 2019-02-03 18:24:47 +05:30
Kovid Goyal 4c9a6ed56c Set a default action name on the dbus notification 2019-02-03 13:53:26 +05:30
Kovid Goyal 1bf2864638 API to handle DBus user notification activation 2019-02-03 13:20:07 +05:30
Kovid Goyal 670de085a3 Add API to GLFW for user notifications using DBus 2019-02-02 13:48:26 +05:30
Kovid Goyal 24669fb6af Port a couple of fixes from upstream
https://github.com/glfw/glfw/commit/72c3908e1474d0cd72bed9fecb6ff3da022f7200
https://github.com/glfw/glfw/commit/cde0aaaab1e3610b6c8f27cd9a5f57f011a31b7d
2019-01-11 14:20:26 +05:30
Dominique Martinet d8a74e8a3c glfw/x11_window/selection: timeout if no answer for two seconds
This prevents kitty to hang forever if a bad client does not give selection
2018-11-30 11:42:45 +09:00
Kovid Goyal be6556c884 X11: Fix missing check for NET_WM_STATE 2018-11-04 10:20:38 +05:30
Tarmack d519553581 Implement primary selection for Wayland 2018-10-31 09:03:22 +05:30
Kovid Goyal 3ed9d9a069 Merge branch 'system_double_click_interval' of https://github.com/Luflosi/kitty 2018-10-28 11:18:43 +05:30
Luflosi 09183772d3 Respect the default system double-click interval 2018-10-26 11:57:33 +02:00
Dominique Martinet ec51a219a7 glfw x11: update cursor position on enter event
kitty would have an incorrect position when clicking after changing window
without moving (e.g. change workspace, create new kitty etc)

For new kitty window, initial position would be 0 and selection paste would
not work because of this
2018-10-26 13:19:12 +09:00
Kovid Goyal 6a51ce5dc4 Wayland: Work on supporting drop of file paths 2018-09-05 21:41:47 +05:30
Kovid Goyal f5cc2fd8ad Update GLFW from upstream 2018-09-04 09:49:18 +05:30
Kovid Goyal 009ef54de7 Implement high precision scrolling with the trackpad on platforms such as macOS and Wayland that implement it.
Fixes #819. Note that I have no idea whether the code works well on
retina screens, might have to multiple the pixel count by the scale
factor on those screens?
2018-08-24 11:00:58 +05:30
Kovid Goyal 55556aaac4 Ensure queued display events are dispatched when polling/waiting for events 2018-07-13 10:56:12 +05:30
Kovid Goyal 342164ede1 Add API for the application to notify the IME system of state changes 2018-07-12 18:18:19 +05:30
Kovid Goyal 78cda7aa74 Implement dispatch for the IBUS connection 2018-07-12 18:18:17 +05:30
Kovid Goyal 99ea6c08a7 Implement timers for the linux event loops
Needed for dbus integration. Also cleanup the event handling code.
X11 and Wayland now share most of their event polling and dispatch logic.
2018-07-12 18:18:17 +05:30
Kovid Goyal e91eb27e56 Refactor linux backend event loops
Allow waiting for events on an arbitrary number of fds. Needed
for async DBUS integration.
2018-07-12 18:18:17 +05:30
Kovid Goyal 4313531432 macOS: Use a custom mouse cursor that shows up well on both light and dark backgrounds
Fixes #359. Also, update GLFW from upstream for retina cursor setting
support.
2018-07-07 10:43:30 +05:30