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
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
Anders Eurenius
4619259e26
Implement resize by increment
2019-12-09 08:33:32 +01:00
Kovid Goyal
d8dd22048a
Wayland: Ensure that glfw window content scale and kitty window content scale are in sync after the window is placed on a monitor
2019-11-16 10:47:05 +05:30
Kovid Goyal
65fa7da24a
Wayland: Use the primary monitor scale for windows on creation
...
This is needed because on creation the window may not have been assigned
to any monitors, so we fallback to using the scale of the primary
monitor. Fixes #2133 . Fixes #2135
2019-11-16 10:00:41 +05:30
Luflosi
b42f4ac288
Restore proper error reporting functionality
...
In 841c907efc643a4f4f06b2686d0d1e6022710600, the `%m` format specifier was replaced by `%%m`, which just prints `%m`. To keep the functionality of `%m` without using `%m`, the error string can be printed manually.
2019-11-05 00:42:29 +01:00
Benoit de Chezelles
7f2b98fad7
Rename all uses of 'scancode' to 'native_key' where relevant
2019-10-16 02:25:20 +02:00
Kovid Goyal
0d68b7078c
Check for float conversion issues on build
...
Useful to catch any errors left over from the migration of times from
double to int64_t
2019-09-27 19:47:25 +05:30
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