313 Commits

Author SHA1 Message Date
Kovid Goyal
8395076da5
Cocoa: Cleanup
From upstream
2018-10-25 10:32:17 +05:30
Kovid Goyal
407d19c2dc
Remove code to import/export from glfw
Since kitty now uses its own private fork, there is no point.
2018-10-24 14:18:01 +05:30
Kovid Goyal
ae9d049011
Better fix for initial window render failure on mojave 2018-10-23 09:04:12 +05:30
Kovid Goyal
3035d64127
Forgot to apply sendEvent micro-optimization to a couple more places 2018-10-23 08:00:20 +05:30
Kovid Goyal
70c9c058e2
Micro-optimization of cocoa event polling 2018-10-21 20:56:27 +05:30
Kovid Goyal
fca95af49b
macOS: Fix IME input for east asian languages
Fix #910
2018-10-21 20:27:03 +05:30
Kovid Goyal
c493583f25
macOS: Fix drag and drop of files not working on mojave
Fixes #1058
2018-10-11 18:36:24 +05:30
Kovid Goyal
b4afbe47b3
wayland: add support for XCURSOR_THEME and XCURSOR_SIZE
These can be set by the compositor or the user to configure the
xcursor theme and size.
2018-10-11 13:39:44 +05:30
Tarmack
c494759606 Divide a second over the key repeat Hz value for the timer value 2018-10-09 14:30:36 +02:00
Kovid Goyal
2102c48b87
Mir: Remove this experimental backend
As of the release of Mir 1.0, libmirclient has been deprecated[1] and
its developers recommend clients using it to switch to Wayland.  This
patch removes support for libmirclient and instruct users to use the
experimental Wayland backend instead.

[1] https://discourse.ubuntu.com/t/mir-news-28th-september-2018/8184
2018-10-06 07:53:41 +05:30
Kovid Goyal
c498f4e8ab
Linux: Include the null byte in joystick path
This potential bug was found thanks to gcc 8’s -Wstringop-truncation
warning.
2018-10-06 07:49:59 +05:30
Kovid Goyal
05a0166ebd
Forgot some mojave substitutions 2018-10-03 22:03:49 +05:30
Kovid Goyal
0484365de6
More fixes for compiling on mojave 2018-10-03 21:50:39 +05:30
Kovid Goyal
cbab3b56de
Fixes for compilation on mojave, needs testing 2018-10-03 20:51:25 +05:30
Kovid Goyal
1fa66ca45d
Wayland: Rename handlers for more unicity 2018-10-03 12:30:48 +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
Kovid Goyal
3fe7d91713
Add some needed includes 2018-10-03 11:06:01 +05:30
Kovid Goyal
98864091ff
Move memfd existence test to glfw.py 2018-10-03 11:02:51 +05:30
Kovid Goyal
7750a461aa
Fix compilation on systems that dont have the memfd_create syscall 2018-10-03 10:56:47 +05:30
Kovid Goyal
ac98b85157
Wayland: Use memfd_create() and seals if available
This allows the compositor to avoid having to setup and teardown a
SIGBUS signal handler whenever it needs to read from this surface, as it
knows we won’t be able to shrink the file and so doesn’t have to protect
against that.

Only enabled on Linux, since only Linux has memfd_create()
2018-10-03 09:47:04 +05:30
Kovid Goyal
21f6c6a5a8
Wayland: Check for buffer creation failure
This prevents unusable decoration objects from being created, and
invalid cursors from being returned to the user.
2018-10-02 11:30:13 +05:30
Kovid Goyal
b82e74f99a
Fix for kitty window not being rendered until moved/resized on macOS Mojave
Fixes #887
2018-09-26 19:43:04 +05:30
Dominique Martinet
897fd9486e glfw/ibus input: use text from ime event instead of global
When a key is pressed, text is generated from xkb and attached to the
global key_event variable.
If another key is pressed before ibus replies, this text in global
variable would be overwritten before the processed reply comes in and
the wrong character would be input, as shown in logs with
--debug-keyboard:

Press scancode: 0x19 clean_sym: w composed_sym: w text: w mods: numlock glfw_key: 87 (W) xkb_key: 119 (w)
↳ to IBUS: keycode: 0x11 keysym: 0x77 (w) mods: numlock
Press scancode: 0x20 clean_sym: o composed_sym: o text: o mods: numlock glfw_key: 79 (O) xkb_key: 111 (o)
↳ to IBUS: keycode: 0x18 keysym: 0x6f (o) mods: numlockIBUS processed scancode: 0x19 release: 0 handled: 0
From IBUS: scancode: 0x19 name: w is_release: 0
↳ to application: glfw_keycode: 0x57 (W) keysym: 0x77 (w) action: PRESS mods: numlock  text: o
on_key_input: glfw key: 87 native_code: 0x77 action: PRESS mods: 0x0 text: 'o' state: 0 sent text to child
IBUS processed scancode: 0x20 release: 0 handled: 0
From IBUS: scancode: 0x20 name: o is_release: 0
↳ to application: glfw_keycode: 0x4f (O) keysym: 0x6f (o) action: PRESS mods: numlock  text: o
on_key_input: glfw key: 79 native_code: 0x6f action: PRESS mods: 0x0 text: 'o' state: 0 sent text to child

Since the whole event is memcpy'd we can just use the text from the
event attached to the reply instead.
2018-09-21 07:34:01 +09:00
Kovid Goyal
ec1f219850
macOS: Make full screening of kitty much faster by using the "traditional full screen" mode of cocoa, similar to iTerm and MacVim
Hopefully workaround a bug in glfw that causes crashes when unplugging
monitors with full screen windows.

Fixes #911
Fixes #898
2018-09-12 15:45:08 +05:30
Kovid Goyal
0195e7f841
Wayland: Add support for animated cursors 2018-09-10 11:54:22 +05:30
Kovid Goyal
141b8a1481
Update glfw from upstream 2018-09-10 09:51:06 +05:30
Kovid Goyal
0fa12a687d
Linux: Turn off IME unless the GLFW_IM_MODULE=ibus env var is set 2018-09-07 16:07:01 +05:30
Kovid Goyal
aa9de47da3 Support compose sequences with no symbol
Compose sequences can be defined without an associated symbol. To test for
completeness, we now also rely on XKB’s reported compose state.

Fixes #880.
2018-09-06 14:53:16 +02:00
Kovid Goyal
33f0ac83c1
Wayland: Allow using the --class to set the app id
Fixes #862
2018-09-06 06:54:38 +05:30
Kovid Goyal
1949f3c3d5
Wayland fix self copy detection across multiple processes 2018-09-05 21:45:32 +05:30
Kovid Goyal
6a51ce5dc4
Wayland: Work on supporting drop of file paths 2018-09-05 21:41:47 +05:30
Kovid Goyal
c0c8e1ce5e
Fill up the rest of the v1 data_source listener struct 2018-09-05 20:04:38 +05:30
Kovid Goyal
6a3d6191bd
Implement the rest of the the data_offer listener callbacks 2018-09-05 19:58:55 +05:30
Kovid Goyal
b2aa07d29f
Wayland: Fix missing data source canceled listener 2018-09-05 19:37:55 +05:30
Kovid Goyal
c84fb68bf8
Wayland: fix copy/pasting into self 2018-09-05 19:23:42 +05:30
Kovid Goyal
128b9e1cd0
Wayland: Implement support for clipboard copy/paste
Fix #855
2018-09-05 17:54:26 +05:30
Kovid Goyal
ace052ee70
Move data device initialization into its own function 2018-09-05 07:51:15 +05:30
Kovid Goyal
547959c1ef
Linux: Fix numpad arrow keys not working when num lock is off
Fixes #857
2018-09-05 07:31:55 +05:30
Kovid Goyal
f3a1ee7b9f
Wayland backend: Add support for copy to clipboard 2018-09-04 22:22:43 +05:30
Kovid Goyal
f5cc2fd8ad
Update GLFW from upstream 2018-09-04 09:49:18 +05:30
Kovid Goyal
e630b76fac
Don't patch glfw when importing since the patch has moved upstream 2018-09-04 09:46:09 +05:30
Kovid Goyal
14f44e79f7
Remove debug printf 2018-08-31 07:56:21 +05:30
Kovid Goyal
ab960ea12d
Linux: Fix slow startup on some systems caused by GLFW searching for joysticks. Since kitty does not use joysticks, disable joystick support.
Fixes #830
2018-08-31 07:51:19 +05:30
Luflosi
1d91edfb00
dont -> don't 2018-08-29 03:18:25 +02:00
Kovid Goyal
ec9bb2302c
... 2018-08-24 11:03:30 +05:30
Kovid Goyal
009ef54de7
Implement high precision scrolling with the trackpad on platforms such as macOS and Wayland that implement it.
Fixes #819. Note that I have no idea whether the code works well on
retina screens, might have to multiple the pixel count by the scale
factor on those screens?
2018-08-24 11:00:58 +05:30
Kovid Goyal
96c444d041
Workaround for bug in glfw causing crash when hotplugging monitors
Fixes #812
2018-08-21 12:52:16 +05:30
Kovid Goyal
ec1c72e9a3
Fix compiler warning 2018-08-20 10:55:49 +05:30
Kovid Goyal
f9b1f6be5c
Fix #809 2018-08-20 10:24:09 +05:30
Kovid Goyal
ecbe79e04f
Update glfw from upstream 2018-08-12 21:36:19 +05:30