Commit Graph

1170 Commits

Author SHA1 Message Date
Kovid Goyal
48070ff38e Fix #7481 2024-05-28 15:14:13 +05:30
Kovid Goyal
55417e4269 Move the window context changing during show fix into glfw code
It more logically belongs there.
2024-05-28 09:46:16 +05:30
Kovid Goyal
9acca045bd macOS: Fix changing window chrome/colors while in traditional fullscreen causing the titlebar to become visible
Fixes #7469
2024-05-23 22:30:57 +05:30
Kovid Goyal
f86102ab88 macOS: Fix --start-as=fullscreen not working when another window is already fullscreen
Apparently, we need to make the window visible before full screening it.
Sigh. I dont know why Apple insisted on this horrible "fancy"
fullscreen of theirs, it's full of bugs and dog slow.

Fixes #7448
2024-05-23 08:38:38 +05:30
Kovid Goyal
adc457ff0f Dynload libsystemd 2024-05-16 21:13:09 +05:30
Kovid Goyal
b5022cbd81 DRYer 2024-05-16 20:17:15 +05:30
Kovid Goyal
32f3d43aa0 Support setting urgency for DBUS notifications 2024-05-16 20:10:26 +05:30
Kovid Goyal
f979c24add Move some defines to only the source files where they are needed 2024-05-16 17:38:26 +05:30
Kovid Goyal
65f06e8fdb Wayland: Fix crash on compositors that dont support the window activation protocol 2024-05-06 08:52:01 +05:30
Kovid Goyal
ce4237c45d DRYer 2024-05-05 14:09:18 +05:30
Kovid Goyal
849dcd424d Wayland: save energy by not rendering "suspended" windows on compositors that support that
Note that this breaks kitty on GNOME 45 which has a bug, but it fine on
GNOME 46.
2024-05-05 13:42:51 +05:30
Kovid Goyal
6e1df67e03 Use xdg-shell version 6
This gives us window "suspended" events. Theoretically these could be
used to implement glfwWindowIconified() and thereby not render suspended
OS windows. However let's wait a bit and see how this stabilizes. There
are all sorts of bugs around this currently, for example:

https://gitlab.gnome.org/GNOME/mutter/-/issues/3435
https://gitlab.gnome.org/GNOME/mutter/-/issues/3229
https://bugreports.qt.io/browse/QTBUG-124450
2024-05-05 13:24:45 +05:30
Kovid Goyal
aecf07bcba Wayland: Fix infinite loop causing bad performance when using IME via fcitx5 due to a change in fcitx5
Fix #7396
2024-04-28 11:30:48 +05:30
Kovid Goyal
8c7994c0ac Dont call wl_egl_window_resize on every swap 2024-04-24 10:04:06 +05:30
Kovid Goyal
8e59b598e0 Improve logging slightly 2024-04-24 09:38:59 +05:30
Kovid Goyal
72272ab4fe Remove need for context switching
Call wl_egl_window_resize just buffer swapping buffers at which point
the context is already correct.

Also might workaround bugs in the NVIDIA driver: https://github.com/NVIDIA/egl-wayland/issues/52
2024-04-24 09:27:02 +05:30
Kovid Goyal
b7e22a357f ... 2024-04-24 08:57:49 +05:30
Kovid Goyal
0f00b0cfb6 Use RAII for context management 2024-04-24 08:21:27 +05:30
Kovid Goyal
9755d0d879 Wayland: Ensure context is correct when calling wl_egl_window_resize
Fixes #7373 (I hope)
2024-04-22 18:07:34 +05:30
Kovid Goyal
fbefd8600f output window id is debug logs useful for debugging issues with multiple os windows 2024-04-22 14:04:26 +05:30
Kovid Goyal
8d1b0e54af Use double for wayland float calculation 2024-04-19 22:23:01 +05:30
Kovid Goyal
63ffa2606c Give the close X a distressed look 2024-04-17 11:05:05 +05:30
Kovid Goyal
f66ee68834 Wayland GNOME: Draw the titlebar buttons without using a font
Fixes #7349
2024-04-17 10:39:30 +05:30
Kovid Goyal
494892c7e4 Dont create the region unless actually needed 2024-04-16 18:16:28 +05:30
Kovid Goyal
6c1a83ffd7 Wayland KDE: Fix window background blur not adapting when window is grown. Also fix turning it on and off not working.
Fixes #7351
2024-04-16 18:11:26 +05:30
Kovid Goyal
e531791f79 Code to get peer pid on a few more platforms 2024-04-15 19:14:29 +05:30
Kovid Goyal
5b587060a4 Fix #7346 2024-04-15 16:07:38 +05:30
Kovid Goyal
e57692e4f5 Possibly fix #7327 2024-04-09 21:19:25 +05:30
Kovid Goyal
ac4eef7eb3 Another try at pointer frame support on Wayland
This time I think I got the wheel handling correct. At least works with
my wheel mouse.
2024-04-08 19:07:52 +05:30
Kovid Goyal
48ed574b4f ... 2024-04-08 13:04:11 +05:30
Kovid Goyal
8fc96c5bd7 Make the debug logging functions consistent
They now all output the same format of:
[time since program start] msg
2024-04-08 12:53:55 +05:30
Kovid Goyal
208490f4e1 ... 2024-04-08 11:18:32 +05:30
Kovid Goyal
d392aba64d Wayland CSD: Dont render window shadows for docked windows 2024-04-08 10:59:03 +05:30
Kovid Goyal
d630b3d8a7 Change the maximize icon to restore when window is maximized 2024-04-08 09:36:38 +05:30
Kovid Goyal
bf60321466 Use individual surfaces for corner and bar shadows
Simplifies a bunch of code and also gives us the option at a later date
to turn off some shadows selectively when the window is in a tiled
state.
2024-04-07 22:28:41 +05:30
Kovid Goyal
eb96830aa0 Make CSD API functions naming consistent 2024-04-07 10:18:13 +05:30
Kovid Goyal
334bb36745 Dont enable CSD for non XDG top-level windows such as layer shell surfaces 2024-04-07 10:08:02 +05:30
Kovid Goyal
283eba9667 Wayland: Respect top level bounds sent by compositor 2024-04-06 17:29:17 +05:30
Kovid Goyal
c651312a88 Adjust button colors 2024-04-06 17:24:55 +05:30
Kovid Goyal
5b1fdc34eb Wire up the buttons 2024-04-06 14:58:31 +05:30
Kovid Goyal
a158fa108b CSD pointer enter is the same as move 2024-04-06 12:51:09 +05:30
Kovid Goyal
60cb0fa650 Move CSD pointer handling code into CSD file 2024-04-06 12:49:07 +05:30
Kovid Goyal
d4cc5aa698 Report errors when attempts are made to perform actions the compositor doesnt support 2024-04-06 11:09:22 +05:30
Kovid Goyal
235b8dc2e4 Assume all capabilities on compositors that dont support reporting of capabilities 2024-04-06 10:59:28 +05:30
Kovid Goyal
4f6faddbab Implement rendering of window control buttons in CSD
They still need to be wired up
2024-04-06 08:32:07 +05:30
Kovid Goyal
416d52bdac ... 2024-04-05 21:33:41 +05:30
Kovid Goyal
9225bd772d Reduce CSD API surface 2024-04-05 19:57:43 +05:30
Kovid Goyal
9e55951d5a ... 2024-04-05 19:37:41 +05:30
Kovid Goyal
d9663aa135 Make code a little clearer 2024-04-05 19:29:51 +05:30
Kovid Goyal
9d86448585 Wayland: Allow hiding window decorations on compositors with SSD as well 2024-04-05 19:23:42 +05:30