Daniel Eklöf
a87b39f6eb
wayland: track current xcursor, and don't update if same
...
We may have many windows open, which tries to update/change the
xcursor at various points.
Track which cursor is currently loaded, regardless of which window it
was set by. If someone tries to load that very same xcursor again,
simply skip it.
One example is when we've moused over a window that does *not* have
keyboard focus, and then the user clicks, or by some other mean gives
that window keyboard focus. In many cases it will then try to set the
same cursor again (most of the times, the cursor is the same
regardless of keyboard focus, but not always).
2019-11-30 12:09:57 +01:00
Daniel Eklöf
c8724fe656
wayland: terminal_from_surface: recognize scrollback search surfaces
...
This fixes an assertion when hovering over the input field for
scrollback searches.
2019-11-29 22:10:28 +01:00
Daniel Eklöf
304ee33fd6
wayland: always flush after dispatching messages
...
This means we don't have to e.g. roundtrip when setting the cursor.
2019-11-29 22:09:56 +01:00
Daniel Eklöf
0dd37f0a36
terminal: use the 'text' xcursor pointer whenever selection is possible
2019-11-28 19:35:47 +01:00
Daniel Eklöf
204bfa02f4
wayland: calculate output PPI (pixels-per-inch)
2019-11-26 19:02:35 +01:00
Daniel Eklöf
721ac4ab31
wayland: change disconnected log type from err -> warn
2019-11-23 13:56:11 +01:00
Daniel Eklöf
29cccadd1d
tllist: is now an external "library", so use <> includes
2019-11-17 19:19:55 +01:00
Daniel Eklöf
988134717f
wayland: verify xdg-output-manager interface version
2019-11-03 16:14:35 +01:00
Daniel Eklöf
4e93b3a2d8
wayland: verify server implements the required interface versions
2019-11-03 15:39:26 +01:00
Daniel Eklöf
a8cb6c531e
Remove unneeded include
2019-11-03 13:07:19 +01:00
Daniel Eklöf
79c3121aa3
misc: fdm already logs failures
2019-11-03 00:52:24 +01:00
Daniel Eklöf
f28fb6c039
timerfd: read() returns -1 with errno == EAGAIN, not 0
...
When there hasn't been a timeout (or in our case, there was a timeout,
but we reset the timer before we got to the read()), read() returns,
not 0, but -1 with errno == EAGAIN.
2019-11-02 01:44:01 +01:00
Daniel Eklöf
b27cd9cedf
timerfd: use non-blocking mode, fixes dead lock
...
Since we cancel the timers every now and then, there's a (small)
chance that one handler cancels a timer that has triggered in the same
epoll() iteration.
When this happens, read() blocks.
Fix by making the timer FDs non-blocking, and simply returning when we
read 0 bytes.
2019-11-02 01:14:40 +01:00
Daniel Eklöf
8b4ef78f7a
wayland: wayl_win_destroy(): looks like we need another roundtrip
2019-11-01 20:45:57 +01:00
Daniel Eklöf
bc815a33db
wayland: wayl_destroy(): destroy any remaining terminals
2019-11-01 20:25:08 +01:00
Daniel Eklöf
2e78dcc5e5
Don't use non-blocking FDs
...
We use epoll() to determine when we can read/write FDs so there's
absolutely no need for non-blocking.
2019-11-01 20:24:13 +01:00
Daniel Eklöf
95b7c405d4
wayland: wayl_win_destroy(): unmap windows before destroying
...
This will trigger e.d. keyboard_leave() and wl_pointer_leave() events,
which ensures there aren't any references to the destroyed window from
the global wayland struct.
Call wl_display_roundtrip() to trigger those events *before* we
destroy the window.
2019-11-01 20:19:53 +01:00
Daniel Eklöf
66b2097275
wayland: wayl_init(): call wl_display_roundtrip() when done
2019-11-01 20:04:40 +01:00
Daniel Eklöf
b793919aba
wayland: fdm_del() now closes the FD
2019-11-01 19:59:39 +01:00
Daniel Eklöf
883354ffb1
wayland: wayl_win_destroy(): return early if win == NULL
2019-10-30 20:25:16 +01:00
Daniel Eklöf
2e0888bf3d
wayland: xdg_toplevel_close(): call term_shutdown()
2019-10-30 20:05:34 +01:00
Daniel Eklöf
445bbe3469
wayland: track multiple terminals
...
The wayland 'term' member is gone and replaced by a list,
'terms'. This list contains all currently running terminal (windows).
2019-10-30 20:02:06 +01:00
Daniel Eklöf
957fb25559
wayland: move reload_cursor_theme() and update_cursor_surface() to wayland
2019-10-27 19:36:45 +01:00
Daniel Eklöf
4a63defeb1
wayland: backend now configures FD as non-blocking, not main
2019-10-27 19:21:36 +01:00
Daniel Eklöf
9a31c1ed96
wayland: free wayland/wl_window instances
2019-10-27 19:16:42 +01:00
Daniel Eklöf
6314de554d
wayl_destroy: early return on NULL
2019-10-27 19:16:25 +01:00
Daniel Eklöf
251cf98388
wayland: move keyboard repeat handling into wayland
2019-10-27 19:16:12 +01:00
Daniel Eklöf
1e75b89552
wayland: integrate directly with the FDM
2019-10-27 19:11:35 +01:00
Daniel Eklöf
61cc8c3c55
wayland: implement wayl_init()
...
Wayland instantiation is now done by the wayland backend, not in main.
2019-10-27 19:08:48 +01:00
Daniel Eklöf
9f0b1f94c2
wayland: change all wayland callbacks to take a wayland pointer
...
Instead of passing the terminal to the wayland callbacks, pass a
'struct wayland' pointer.
2019-10-27 18:43:07 +01:00
Daniel Eklöf
c9455d5f21
kbd: move into wayland
2019-10-27 17:10:32 +01:00
Daniel Eklöf
5ca1ee701b
wayland: move clipboard/primary structs into the wayland struct
...
These are application global and very wayland specific
2019-10-27 16:15:32 +01:00
Daniel Eklöf
9e6c28f5b6
wayland: implement wayl_win_destroy()
2019-10-27 16:01:44 +01:00
Daniel Eklöf
942ff566a2
wayland: implement wayl_destroy()
2019-10-27 15:57:23 +01:00