267 Commits

Author SHA1 Message Date
Mitchell Hashimoto
685495c896 apprt/gtk: make wide-style gtk tabs configurable 2023-09-28 08:54:15 -07:00
Nathan Fisher
dca0ddb7e1 (Gtk) Set tab labels to fill the available space, so that they will
divide up the avialable horizontal area instead of leaving a large
empty space in the tab bar.
2023-09-28 00:10:07 -04:00
Mitchell Hashimoto
8c4d25050a apprt/gtk: detect keyboard modifier state for mouse events 2023-09-26 12:37:59 -07:00
Mitchell Hashimoto
510f0fe8f2 apprt/embedded: if a physical key input is a keypad key, keep it 2023-09-22 11:44:18 -07:00
Mitchell Hashimoto
d287e741b1 apprt/embedded: initialize unmodified keystate prior to use
Fixes #521

We were not initializing the dead key state. The dead key state is read
on all translation calls so it must be initialized to 0. This was
working before because coincidentally whatever the memory was always
worked (it probably didn't, but it never didn't work for someone to
notice).

In debug modes, Zig sets uninitialized memory to 0xAAAAAAAA. Amusingly,
this is a valid dead key state value that UCKeyTranslate ignores and
thus produces the correct value. Therefore, we were only seeing bugs in
release modes where the uninitialized memory was a bad value
(consistently 0x1 on my machine) causing the wrong key to come out.

We were getting lucky before, this has always been a bug.
2023-09-22 09:18:52 -07:00
Mitchell Hashimoto
ec7ab5b6a4 apprt/gtk: always set app ID, use G_APPLICATION_NON_UNIQUE instead
This makes the icon and title work on Wayland while retaining the
gtk-single-instance functionality.
2023-09-21 10:57:10 -07:00
Mitchell Hashimoto
1f7d567f29 apprt/gtk: use gtk_keyval_to_lower to get unshifted
map_keycode was not respecting the keyboard layout!
2023-09-19 17:44:18 -07:00
Mitchell Hashimoto
7748390a7e apprt/gtk: async clipboard 2023-09-19 10:53:45 -07:00
Mitchell Hashimoto
5a02635d2c macos: async style clipboard reading 2023-09-19 10:36:17 -07:00
Mitchell Hashimoto
b30feeb596 core: move clipboard to async process 2023-09-19 10:18:17 -07:00
Mitchell Hashimoto
ed0a2ecfc4 apprt/gtk: window actions should use currently active surface 2023-09-18 15:33:11 -07:00
Mitchell Hashimoto
f3662354e5 apprt/gtk: about window 2023-09-18 15:16:35 -07:00
Mitchell Hashimoto
bf665b7c63 apprt/gtk: reset accelerators initially 2023-09-18 15:03:36 -07:00
Mitchell Hashimoto
844945e7f9 apprt/gtk: add reload config 2023-09-18 15:00:54 -07:00
Mitchell Hashimoto
c3a72b9188 apprt/gtk: add new tab button in header 2023-09-18 14:55:37 -07:00
Mitchell Hashimoto
7996be25a8 apprt/gtk: new window, tab 2023-09-18 14:51:19 -07:00
Mitchell Hashimoto
71ca254be8 apprt/gtk: window actions 2023-09-18 14:41:52 -07:00
Mitchell Hashimoto
dcf615022e apprt/gtk: key file for logic related to keys 2023-09-18 14:27:05 -07:00
Mitchell Hashimoto
394ab3017f apprt/gtk: initial app menu 2023-09-18 12:54:19 -07:00
Mitchell Hashimoto
4606d56dc0 apprt/gtk: config errors is not an application window 2023-09-18 11:24:19 -07:00
Mitchell Hashimoto
6df01b87c1 apprt/gtk: if errors fixed, hide window 2023-09-17 22:34:34 -07:00
Mitchell Hashimoto
80e02c6c9f apprt/gtk: update config error contents on reload 2023-09-17 22:31:52 -07:00
Mitchell Hashimoto
92465f57ea apprt/gtk: grab focus of config window when reloading 2023-09-17 22:28:58 -07:00
Mitchell Hashimoto
f82fd56933 apprt/gtk: hook up buttons 2023-09-17 22:09:44 -07:00
Mitchell Hashimoto
40315afe72 apprt/gtk: extract config errors window into views 2023-09-17 22:03:43 -07:00
Mitchell Hashimoto
fe15e7d5fd apprt/gtk: add View to help with auto-layout views 2023-09-17 21:59:25 -07:00
Mitchell Hashimoto
bd3b5d5332 apprt/gtk: working on config errors window 2023-09-17 21:37:57 -07:00
Mitchell Hashimoto
84da10a9b3 apprt/gtk: don't use userdata for pages, can request on demand
This is important to keep it in sync if the gl area moves
2023-09-16 12:11:10 -07:00
Mitchell Hashimoto
cf84a5513f apprt/gtk: listen to page-removed to hide tab bar if only one 2023-09-16 11:48:33 -07:00
Mitchell Hashimoto
5dc0746a17 gtk: tabs are draggable to the desktop to extract a window 2023-09-16 11:30:22 -07:00
Mitchell Hashimoto
f7272d506e apprt/gtk: handle scenario where OpenGL area becomes unrealized 2023-09-16 09:38:28 -07:00
Mitchell Hashimoto
d2fa79effb apprt/gtk: shuffle some lines around in Window 2023-09-16 08:32:32 -07:00
Mitchell Hashimoto
35c956fd05 apprt/gtk: Window css styling is no longer used 2023-09-16 08:29:15 -07:00
Mitchell Hashimoto
d5036e78f4 apprt/gtk: refactor into separate files 2023-09-16 08:28:49 -07:00
Mitchell Hashimoto
120588fb62 apprt/gtk: show warning when running debug version 2023-09-15 15:57:51 -07:00
Tim Culverhouse
de5c416341 gtk: handle all close-requests
When compiling in any Release mode, the default gtk close-request
handler does not properly fire. We only rely on the default handler if
we aren't confirming the close. Replace the default handler with our own
in all cases (and just destroy the window if we don't need
confirmation).

Fixes #458
2023-09-15 04:31:50 -05:00
Mitchell Hashimoto
54f58d9cd2 apprt/gtk: implement hide cursor 2023-09-14 19:45:20 -07:00
Mitchell Hashimoto
724900f143 macos: implement setCursorVisibility 2023-09-14 19:37:30 -07:00
Mitchell Hashimoto
a7e8b7559e mouse-hide-while-typing config and glfw implementation 2023-09-14 17:36:21 -07:00
Mitchell Hashimoto
62ae59cd97 apprt/gtk: apply GDK scale factor to mouse coordinates
Fixes #452
2023-09-14 12:26:36 -07:00
Mitchell Hashimoto
01cb1ad90e apprt/gtk: cursor state should be on surface 2023-09-14 11:22:54 -07:00
Thorsten Ball
d96d60445a Fix compilation issues with GTK cursor support 2023-09-14 20:19:53 +02:00
Mitchell Hashimoto
cb2931cb27 rename cursor shape to mouse shape for OSC 22 2023-09-14 11:12:17 -07:00
Mitchell Hashimoto
674575e598 apprt/gtk: support set cursor shape 2023-09-14 10:55:05 -07:00
Mitchell Hashimoto
3356146bb4 macos: support cursor style 2023-09-14 10:40:40 -07:00
Mitchell Hashimoto
31a61613e9 apprt/glfw: support setting cursor shape 2023-09-14 10:23:11 -07:00
Mitchell Hashimoto
7734bab8c4 terminal: cursor shape parsing, hook up to apprt callback 2023-09-14 10:12:38 -07:00
Mitchell Hashimoto
c3bf054dd4 apprt/embedded: call core app reload config so changes go to all threads 2023-09-13 19:01:05 -07:00
Mitchell Hashimoto
678bd0de0c core: surface should not use app mailbox
The surface runs on the same thread as the app so if we use the app
mailbox then we risk filling the queue before it can drain. The surface
should use the app directly.

This commit just changes all the calls to use the app directly. We may
also want to coalesce certain changes to avoid too much CPU but I defer
that to a future change.
2023-09-13 08:34:09 -07:00
Mitchell Hashimoto
fc90a4a052 apprt/gtk: do not ask for confirm window close if all surfaces idle 2023-09-11 15:53:20 -07:00