236 Commits

Author SHA1 Message Date
Tong Mu
79249cf134 [macOS] Reset keyboard states on engine restart (flutter/engine#29283)
With this PR, the state of the keyboard system will be reset when the engine is reset (typically during a hot restart.)
2021-10-27 17:03:41 -07:00
Robert Ancell
0246f028f5 Add comment about why the present callback is empty 2021-10-27 15:27:29 +13:00
Robert Ancell
2d5c109c4d Remove unused present method
This is now done by the FlutterCompositor.present_layers_callback.
2021-10-27 15:27:29 +13:00
Tong Mu
e565b58d65 [Linux] Reset keyboard states on engine restart (flutter/engine#28877)
With this PR, the state of the keyboard system will be reset when the engine is reset (typically during a hot restart.)
2021-10-06 12:26:33 -07:00
Tong Mu
2e334c1134 Keyboard guarantee non empty events (flutter/engine#28648)
* Web

* macos

* Linux

* Easier web impl

* doc and format

* Better linux impl

* Format

* Better impl mac

* Format

* Windows

* Format

* Apply suggestions from code review

Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>

Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>
2021-10-04 14:01:51 -07:00
Tong Mu
f53ff208be [Linux] Fix crash when a method channel is reassigned (flutter/engine#28878)
* Impl

* Format

* Doc
2021-09-29 10:47:00 -07:00
Tong Mu
8ef081034c [Linux, Embedder] Add engine restart hooks (flutter/engine#28924)
* Restart

* Format

* Doc

* Test

* Format

* Revert keyboard
2021-09-29 10:46:43 -07:00
Yuhui Huang
1b2b1cae4c Linux texture support (flutter/engine#24916) 2021-09-23 13:53:02 -07:00
Brandon DeRosier
7b6fa075a7 Flip on leak detector and suppress or fix remaining leak traces (flutter/engine#28625)
Patch/suppress the remaining leaks and flip on the leak detector to start catching new leaks in CI.
2021-09-16 12:58:56 -07:00
Daco Harkes
eb9ef3e99c [Desktop][Linux] Add RUNPATH $ORIGIN to flutter_linux_gtk (flutter/engine#28525) 2021-09-13 07:57:29 +02:00
stuartmorgan
92341a8a64 Fix typo in FlMethodResponse docs 2021-09-01 16:46:08 +12:00
Shax
07e2ce8fd9 Rename fl_get_length to fl_value_get_length (flutter/engine#27757) 2021-08-26 13:06:02 -07:00
Brandon DeRosier
16829de462 Fix stack-buffer-overflow in linux value tests (flutter/engine#28204) 2021-08-19 13:51:24 -07:00
Tong Mu
b2924176cc [Keyboard] Send empty key events when no key data should (flutter/engine#27774)
The keyboard system on each platform now sends an empty key data instead of nothing if no key data should be sent.
2021-07-30 13:35:39 -07:00
Tong Mu
1a71c70587 Update key mapping to the latest logical key values (flutter/engine#25883)
This PR updates the key mapping tables of every platform according to the change to keycode_gen.
2021-07-21 01:58:09 -07:00
George Wright
f4aa3aad88 Add unit tests for Dart entrypoint arguments on Linux (flutter/engine#26951) 2021-06-25 11:05:24 -07:00
Robert Ancell
3fa5f09847 Re-enable non-smooth scrolling. (flutter/engine#26549)
Since 0561c75b4d events are now handled in a GtkEventBox and the duplicate
scroll events no longer occur.

Fixes https://github.com/flutter/flutter/issues/73823
2021-06-24 13:06:05 -07:00
J-P Nurmi
98097883e7 FlTextInputType enum 2021-06-16 15:16:00 +12:00
J-P Nurmi
765ce54192 Linux: add support for TextInputType.none
TextInputType.none makes it possible to disable the virtual keyboard
for certain TextFields, and lays the foundations for custom in-app
virtual keyboards (flutter/flutter#76072).

Ref: flutter/flutter#83567
2021-06-16 15:16:00 +12:00
Jeff Ward
cf4c1e15c7 Add Float32List support to the Linux standard message codec 2021-06-03 08:38:45 +12:00
Tong Mu
00e9f108c1 Hardware Keyboard: Linux (GTK) (flutter/engine#23467)
Linux (GTK) changes for the Hardware Keyboard project.
2021-05-25 18:04:03 -07:00
Matej Knopp
dc1c45a5c5 FlView: Handle leave-notify-event (flutter/engine#26181)
* FlView: Handle leave-notify-event

Fixes https://github.com/flutter/flutter/issues/82648

* Fix leave notify during mouse grab

* Send kAdd pointer event on enter notify
2021-05-19 12:56:00 +02:00
Robert Ancell
88f7648d42 Fix GIR transfer annotation 2021-05-14 11:03:33 +12:00
Matej Knopp
5f6eb6479b Implement smooth resizing for Linux (flutter/engine#25884) 2021-05-07 08:44:01 -07:00
J-P Nurmi
4268ae8f75 [Linux] revise dark theme detection (flutter/engine#25535) 2021-05-06 20:14:01 -07:00
Chris Bracken
9b4a0264d5 Correct typos throughout the engine/embedder (flutter/engine#25346)
Used the the `misspell` tool available at
https://github.com/client9/misspell, then applied hand-corrections. It's
possible we could adopt this as a presubmit, but there are still enough
false positives that it may not be worth the effort.
2021-04-01 11:08:19 -07:00
Yuhui Huang
8d051fad2f fix printing Failed to determine valid GL format (flutter/engine#24964) 2021-03-12 22:36:25 -08:00
huanghongxun
87509d8518 Fix incorrect texture format with OpenGL ES 2021-03-12 11:27:02 +13:00
Yuhui Huang
e56f733369 Fix high CPU consumption (flutter/engine#24944) 2021-03-11 10:32:44 -08:00
Chris Bracken
e2a2a79a1d Add framebuffer destruction_callback for Linux (flutter/engine#24901)
While we no longer crash when the framebuffer destruction_callback is
null (patched in https://github.com/flutter/engine/pull/24845) we should
bet setting one, even if it's a no-op containing a comment pointing to
where cleanup is implemented.
2021-03-10 10:26:49 -08:00
J-P Nurmi
069154f7ee [linux] Fix text selection via Shift+Home/End (flutter/engine#24623)
Adds TextInputModel::SelectToBeginning/End() and applies when shift key is pressed.
2021-03-05 08:51:33 -08:00
Chris Bracken
b638110ac3 Add missing header guard, namespace (flutter/engine#24423)
TextRange was missing a namespace declaration and header guards.
2021-02-15 13:26:43 -08:00
George Wright
a46f817aee Move shell/platform/common/cpp to shell/platform/common (flutter/engine#24210) 2021-02-04 14:06:02 -08:00
huanghongxun
a5b9730ca5 No longer redraw window every frame to reduce CPU consumption 2021-02-04 09:30:26 +13:00
Yuhui Huang
0561c75b4d Refactor FlRenderer to platform-independent implementation (flutter/engine#24011)
Refactor FlRenderer to platform-independent implementation
2021-02-03 11:31:51 +13:00
Damian Wrobel
c3a7c60296 Fix argument specifier for g_warning() (flutter/engine#23674)
Fixes the following compilation error:
 ../../flutter/shell/platform/linux/fl_key_event_plugin.cc:189:7:
 error: format specifies type 'long' but the argument has type
 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
2021-01-28 14:36:02 -08:00
Robert Ancell
124ce62dd2 Use the scroll multiplier that the Chromium source uses.
Fixes https://github.com/flutter/flutter/issues/71385
2021-01-14 09:06:36 +13:00
Robert Ancell
7436af8647 Only handle smooth scroll events.
On X11 scroll events are being directly sent to the FlView X window. This is
causing them to bypass the normal scroll handling and means this widget received
both smooth and non-smooth scroll events.

I haven't been able to find a solution to the root cause of the problem, so only
smooth scroll event are being processed. This could cause issues on older
versions of the X server that don't send smooth scroll events, but fixes the
problem for the common modern case.

This issue doesn't occur in Wayland.
2021-01-14 09:06:36 +13:00
Robert Ancell
0cadee4e98 Add accessibility suport to Linux shell. (flutter/engine#19634)
Add accessibility support to the Linux shell
2021-01-13 13:49:48 +13:00
Robert Ancell
af2850ee0d Only remove weak pointers that are set.
If the pointer has already been removed this generates a runtime warning.
2021-01-12 15:35:39 +13:00
Greg Spencer
5d9a19e3c0 Fix indexing error in Linux key event handling (flutter/engine#23598)
Fixes an indexing error in the linux key handling code.

I also found another error when checking to see if an event is re-dispatched, and some off-by-one errors in the search. Not sure what I was smoking that day, but hopefully these are all the issues.
2021-01-11 13:01:06 -08:00
Robert Ancell
543a61f8c6 Re-enable test 2021-01-11 11:36:40 +13:00
Robert Ancell
17d45cd5a3 Fix double frees in FlSettingsPlugin tests.
Fixes https://github.com/flutter/flutter/issues/73517
2021-01-11 11:36:40 +13:00
Robert Ancell
7ca7ce114f Remove debugging code 2021-01-11 11:36:40 +13:00
Greg Spencer
70bba34e51 Make pending event handling more lenient to allow out of order responses (flutter/engine#23504)
This PR makes the Linux key handling code a little more lenient when it comes to the order in which it receives responses to key events from the framework. I had assumed that there wasn't a case where responses could get out of order, but it seems that it is possible, given that you can mash on the keyboard and eventually get one out of order.

This changes the code so that instead of just looking at the first entry in the pending event deque, it searches the deque starting at the beginning to find the event, and remove it.
2021-01-08 10:43:59 -08:00
Jason Simmons
2c5db12c82 Skip the FlEngineTest.SettingsPlugin test (flutter/engine#23516)
See https://github.com/flutter/flutter/issues/73517
2021-01-07 17:03:28 -08:00
Damian Wrobel
0c179e5d66 Fix argument specifier for g_warning() (flutter/engine#23138) 2021-01-07 15:34:03 -08:00
Robert Ancell
ae52e3b83c Implement settings channel for the Linux shell (flutter/engine#22486)
Implement settings channel for the Linux shell

Fixes https://github.com/flutter/flutter/issues/65591
2021-01-05 12:28:43 +13:00
Robert Ancell
7505bd518a Add engine tests for Linux shell 2021-01-05 09:50:52 +13:00
Robert Ancell
6fc7c5e846 Implement SystemSound.play 2020-12-11 13:38:47 +13:00