Commit Graph

86 Commits

Author SHA1 Message Date
Luflosi
f3b9ff5f9f
Use datatype monotonic_t instead of double to keep track of time
The time is stored in a signed 64 bit integer with nanosecond accuracy. This eliminates the possibility of floating-point inaccuracies.
`monotonic_t` can currently hold values large enough to work correctly for more than 200 years into the future.
Using a typedef instead of directly using `int64_t` everywhere will also allow easily changing the datatype in the future should the need arise for more precise or bigger time values.
2019-09-25 17:43:11 +02:00
Luflosi
6cc720a350
Fix typos
Inspired by 4d3ee554b3.
Found using `codespell`.
2019-08-26 12:31:15 +02:00
Luflosi
94d56d1a9e
Correct indentation for two _glfwInputError() messages
This commit changes the indentation of two error messages to match the indentation in the rest of the code.
2019-08-25 21:29:58 +02:00
Luflosi
28bb123be8
Update the GLFW version number from 3.3 to 3.4
Closes https://github.com/kovidgoyal/kitty/issues/1884.
From a337c56848.
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 56aad76b16.
2019-07-20 21:07:27 -05:00
Kovid Goyal
fb0d98ead1
Add more debugs to Wayland handleEvents() 2019-07-20 14:48:28 +05:30
Kovid Goyal
4096caba64
Cancel read if dispatch_pending fails 2019-07-20 14:32:57 +05:30
Kovid Goyal
38f77144fa
Wayland: dont abort the event handler early if there are no pending events from the compositor. This ensures that the tick callback and other event sources are dispatched. 2019-07-20 14:09:09 +05:30
Kovid Goyal
b8041ce17f
Wayland: Fix infinite loop if the compositor dies 2019-07-20 13:55:38 +05:30
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
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
Luflosi
8be698681c
Reduce the difference of glfw/wl_* 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-12 14:55:56 +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
c509ecca52
Wayland: Fix resizing the window on a compositor that does not provide server side window decorations, such a GNOME or Weston not working correctly
See #1659
2019-06-04 19:40:00 +05:30
Kovid Goyal
f33205a490
Wayland: Fix maximizing the window on a compositor that does not provide server side window decorations, such a GNOME or Weston not working
Fixes #1662
2019-05-29 17:07: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
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: 599fb3de34
2019-05-11 17:50:02 +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
ecf2c86787
Wayland: Abort on fatal display errors instead of looping forever 2019-03-22 08:53:10 +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
bfb97a6e6f
Wayland: use correct name for hand cursor 2019-03-21 09:24:51 +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
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
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
423f8e59cc
Wayland: Fix auto-iconify on kwin_wayland
Upstream: 45bd991ea9
2019-02-17 10:35:39 +05:30
Kovid Goyal
1c468b2931
Wayland: Only auto-iconify fullscreen windows
Upstream: edf0a07174
2019-02-17 10:31:17 +05:30
Kovid Goyal
85faad5ec7
Wayland: use SHM_ANON on FreeBSD
Upstream: 36ce73bbfd
2019-02-17 10:30:02 +05:30
Kovid Goyal
22ed014123
Fix tabs being used for spaces in some source code files 2019-02-03 19:59:02 +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
Tarmack
a6900443d5 Wayland primary selection migrated to unstable protocol
This change is actually backwards compatible with the GTK implementation before.
2018-11-13 20:58:02 +01:00
Kovid Goyal
7db6318806
Only warn about failure to primary select once 2018-10-31 09:09:46 +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
Kovid Goyal
31a0a9427e
... 2018-10-27 11:35:25 +05:30
Kovid Goyal
04f10ba570
Fix leak of Wayland callback structure when doing a copy 2018-10-27 11:34:54 +05:30
Luflosi
09183772d3
Respect the default system double-click interval 2018-10-26 11:57:33 +02:00
Kovid Goyal
3e4eca5816
Wayland: Fix cursor being reset continuously
Should only do that if the cursor is actually supposed to be animated.
2018-10-26 11:23:34 +05:30
Kovid Goyal
174bd5c57f
Commit the wl_surface to ensure that we receive the frame event 2018-10-26 10:12:54 +05:30
Kovid Goyal
cca2fb967c
Avoid malloc for frame callbacks 2018-10-26 08:49:17 +05:30
Kovid Goyal
5b547d9b06
Initial attempt at supporting Wayland frame events
Does not actually work because the wayland frame callback is not called
at all, fo rsome reason I cannot determine.
2018-10-26 07:42:57 +05:30
Kovid Goyal
13b10f691d
Wayland: Add support for xdg-decoration
This allows compositors which prefer to draw the decorations around
clients to do so, rather than letting GLFW draw its own decorations.
The appearance is thus entirely subject to the compositor used, but
should generally be better than the current solid colour decorations we
have, which we continue to use when the compositor doesn’t support this
protocol or tells us to draw the decorations ourselves.
2018-10-03 12:27:51 +05:30