1000 Commits

Author SHA1 Message Date
Derek Schrock
3b57acf03c More cases of #5477 functions with empty argument lists
Building on macOS 13.3.1 (22E261) clang 14.0.3 (clang-1403.0.22.14.1)
running to errors like #5477 where functions without argument lists at
least need void.

Looking for possible suspect functions via:

  git grep -E "^([A-Za-z_]+ )?[A-Za-z_]+\()" \*.c \*.m
2023-04-16 01:09:36 -04:00
Kovid Goyal
66801b6b28
GLFW API to track system color scheme dark/light
Implemented only on macOS and Wayland.
2023-04-13 13:16:33 +05:30
Kovid Goyal
672ecde68b
X11: Fix a crash if the X server requests clipboard data after we have relinquished the clipboard
Fixes #5650
2023-03-07 13:53:07 +05:30
Kovid Goyal
cd8bb462c3
Add KITTY_VCS_REV for release builds as well 2023-02-28 19:41:28 +05:30
Kovid Goyal
935a36f5a8
Allow specifying VCS revision on the build command line 2023-02-28 13:05:43 +05:30
pagedown
4f44945c07
macOS: Restore pre-edit text after inserting text from the service
Add comments to explain how to get the methods to be called.
2023-02-24 19:57:09 +08:00
pagedown
f8b53df5c2
macOS: Fix resize_in_steps being applied when double-clicking on the
title bar to maximize the window
2023-02-24 19:56:51 +08:00
pagedown
9a598237c6
macOS: Allow IME to actively get the cursor position in real time
IME will automatically get the display position when needed, which keeps
it consistent with the overlay as much as possible.

Fix the issue that when IME is activated after mouse click, it is
displayed at the wrong position.
2023-02-22 22:36:20 +08:00
pagedown
ba83ce7b10
macOS: Display the newly created OS window in specified state
Fix the maximized window can't occupy full screen space when window
decoration or title bar is hidden.
Fix resize_in_steps being applied even when window is maximized.
Allows to specify `os_window_state` in startup session file.
2023-02-18 14:02:19 +08:00
pagedown
c41b65af97
macOS: Update window button visibility after toggling full screen 2023-02-12 13:45:27 +08:00
Luofan Chen
130315ce8d Use strict function prototypes
Fixes clang error:
error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
2023-02-09 13:16:00 +08:00
Kovid Goyal
a7cbe3776d
Wayland GNOME: Fix for ibus not working when using XWayland
See 8ce25208c3

I dont know what it is with GNOME. Every single release they break
backward compatibility somewhere, somehow. They must have special
talents.

Fixes #5967
2023-02-02 10:25:33 +05:30
Kovid Goyal
78d0cc40a3
Fix readSelectionFromPasteboard not actually inserting the text 2023-02-02 06:14:34 +05:30
Kovid Goyal
01720a8d4f
Fix typo seems to have no actual effect, but... 2023-02-02 06:07:30 +05:30
Kovid Goyal
682428fb54
Optimize the services implementation
Dont construct the selection string when we are merely checking if a
selection exists.
2023-02-01 12:46:19 +05:30
Kovid Goyal
1c6bae636b
Only accept service requests when we actually have a selection 2023-02-01 12:17:59 +05:30
Kovid Goyal
18fc8dad37
Instead of calling insertText duplicate some of its code so we arent limited in the size of text we can insert 2023-01-29 19:56:53 +05:30
Kovid Goyal
9b5034f904
macOS: Integrate with system services 2023-01-29 19:47:50 +05:30
Kovid Goyal
a4075ff041
X11: Fix a crash when listing clipboard MIME types and the clipboard is owned by self
Fixes #5920
2023-01-22 21:19:03 +05:30
Kovid Goyal
a068e3e655
Fix issues reported by ruff 2023-01-09 15:54:41 +05:30
Kovid Goyal
58497161c0
X11: When pasting text/plain try UTF8_STRING first then text/plain/charset=utf-8
Fixes #5842
Also fixes pasting from GTK+2 applications like leafpad.
2022-12-30 22:20:43 +05:30
Kovid Goyal
3f65ce0e71
Make sizes explicit in a few reallocs 2022-12-13 12:11:37 +05:30
Kovid Goyal
fefafda9a0
Fix #5764 2022-12-12 21:26:54 +05:30
Kovid Goyal
76f6288e69
... 2022-12-03 12:25:23 +05:30
Kovid Goyal
0b293428c4
X11: Fix reading list of available mime types 2022-12-03 08:16:59 +05:30
Kovid Goyal
4c72f92939
Wayland GNOME: Workaround for latest mutter release breaking full screen for semi-transparent kitty windows
Destroy the CSD surfaces when window goes full screen.
Fixes #5677
2022-11-28 14:19:13 +05:30
Kovid Goyal
f127523ae9
Get rid of the unneccessary swap on first configure
Instead use the new flag to indicate the surface should not be committed
till the next swap.
2022-11-14 15:42:07 +05:30
Kovid Goyal
8280899ce1
IBUS: When creating the connection mark as focused if any top level window has focus. Fixes #5655 2022-11-10 07:21:34 +05:30
Kovid Goyal
b15c9f7419
Function should be static 2022-11-10 07:18:17 +05:30
Kovid Goyal
88b829fc9b
cleanup comment 2022-11-01 12:22:05 +05:30
Kovid Goyal
a6855bde3c
Merge branch 'no_cursor_update_if_not_changed' of https://github.com/wengxt/kitty 2022-11-01 12:20:18 +05:30
Kovid Goyal
f6f2f00c53
Add a note about wayland semantics 2022-11-01 12:13:23 +05:30
Kovid Goyal
2435a8ccfd
Wayland GNOME: Fix incorrect window size when in some circumstances when switching between windows with window decorations disabled
Only call wl_surface_commit() after a resize when the correct size buffer is
attached to the surface. This is ensured by setting a flag on the window that prevents
all surface commits till it is cleared. The flag is cleared at next
eglSwapBuffers().

I dont actually understand if this guarantees that the
buffer size is always correct. For example, if the back buffer is
latched when wl_egl_resize_window() is called, the backbuffer will be
correct only after two swaps (I think). Or maybe the old back buffer is
discarded, I cant find any documentation about it.

All I can say is that doing it this way seems to fix the issue.

Thanks to @jadahl for his help with tracking down the root cause.

Fixes #4802
2022-10-31 21:59:01 +05:30
Kovid Goyal
de122ed727
Bind eglQuerySurface 2022-10-31 21:03:39 +05:30
Kovid Goyal
f5126c664c
Wayland KDE: Fix abort when pasting into Firefox
Dunno why kwin uses drag and drop callbacks when pasting into Firefox on
Wayland, but then this is Wayland, so every stupid thing imaginable will
be done at least once.

Fixes #5603
2022-10-19 11:28:33 +05:30
Kovid Goyal
6890e265b6
GNOME Wayland: Fix a memory leak in gnome-shell when using client side decorations
destroy CSD buffers that were never attached explicitly, as mutter does
not send release events for these even when the pool is destroyed.
2022-10-12 17:52:47 +05:30
Kovid Goyal
fbfaefd72a
Wayland: Fix an abort when changing background colors with wayland_titlebar_color set to background
Fixes #5562
2022-10-07 14:13:12 +05:30
Felix
15e4be9051 Fix clipboard target properties and memory leak 2022-10-04 17:22:15 +02:00
Kovid Goyal
98eacb2067
panel kitten: Do not depend on xprop 2022-09-24 15:44:54 +05:30
Kovid Goyal
2cef9abbd3
Get rid of one call to xprop in the panel kitten 2022-09-24 15:17:11 +05:30
Kovid Goyal
42178a4570
X11: Fix a regression in the previous release that caused pasting from GTK based applications to have extra newlines
Fixes #5528

And let me just re-iterate, GNOME/GTK is developed by morons.
2022-09-24 08:56:50 +05:30
Kovid Goyal
fe2f3d9870
Wayland: Remove the mutter specific ignoring of the first empty surface configure event. It seems to be no longer necessary on current mutter, with the recent Wayland changes 2022-09-11 14:37:50 +05:30
Kovid Goyal
dcf2152a7a
Wayland: Generate a XDG_ACTIVATION_TOKEN when opening URLs or running programs in the background via the launch action 2022-09-11 14:25:49 +05:30
Kovid Goyal
58a3baaf0f
Wayland: Use XDG_ACTIVATION_TOKEN when present at launch 2022-09-11 13:43:52 +05:30
Kovid Goyal
ba8d30896b
Try to use the activation protocol to focus windows 2022-09-11 10:39:28 +05:30
Kovid Goyal
4d30ae55f3
Wayland: Mark windows in which a bell as urgent on compositors that support the xdg-activation protocol 2022-09-11 09:33:41 +05:30
Kovid Goyal
983ab3c67d
build wayland xdg-activation protocol 2022-09-10 16:08:38 +05:30
Kovid Goyal
0bf228b030
Wayland: Micro-optimization: Assume window will be shown on primary monitor so create it with its scale set to that of the primary monitor 2022-09-10 15:23:56 +05:30
Kovid Goyal
29b3a92ffc
Wayland: swap buffers immediately on scale change to ensure attached buffer is a multiple of the new scale
Earlier we were only swapping buffers when ready to draw, but the
Wayland protocol  requires the attached buffer to be a multiple of the
scale. We cannot guarantee an application side swap will be triggered
before the next commit, so instead we blank the new buffer swap it in
the GLFW backend itself.

Fixes #5467
2022-09-10 15:09:46 +05:30
Kovid Goyal
bc650f6230
Output initial window creation size in debug 2022-09-10 12:28:53 +05:30