181 Commits

Author SHA1 Message Date
George Wright
e372826773 Remove D3D9 fallback path (flutter/engine#29533) 2021-11-04 14:33:25 -07:00
Brandon DeRosier
9979f27436 Fix TaskRunnerTest.MaybeExecuteTaskOnlyExpired flake (flutter/engine#29484)
* Fix windows flake

* Make the timing deterministic
2021-11-02 14:57:55 -07:00
Greg Spencer
ba99c3b465 Fix deleting compose string in IME (flutter/engine#29396) 2021-11-01 10:45:59 -07:00
Tong Mu
f0825fd030 [Win32, Keyboard] Fix toggled state synthesization misses up events (flutter/engine#29282)
This PR fixes a problem where up events might be missed during synthesizing for toggled states.
2021-10-27 23:14:46 -07:00
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
godofredoc
ae68d0409b Update documentation links to point to main branch. (flutter/engine#29326) 2021-10-26 10:48:02 -07:00
moko256
463e6ff6e1 Fully inplement TaskRunner for UWP (flutter/flutter#70890) (flutter/engine#28013) 2021-10-21 16:03:02 -07:00
Chris Bracken
9d6070dd18 Win32: Enable semantics on accessibility query (flutter/engine#29269)
Windows does not provide a system notification the embedder can
subscribe to to determine when a screen reader or other assistive
technology that requires the semantics tree has been enabled. [1]

In the absence of such a notification, we watch for queries for the
IAccessible COM object representing the root node of the semantics tree,
and on receipt of such queries we enable the semantics tree. For the
time being, we assume that if accessiblity is enabled, it will be
enabled for the duration of the application lifetime. In a future patch
we can optimise this by adopting the approach taken by Chromium, which
is to disable semantics if we haven't received a query within some
reasonable timeout.

This patch enables Flutter's semantics tree; a follow-up patch wires in
the AccessibilityBridge which maintains the AXTree of COM objects that
is the Windows representation of the Flutter SemanticsTree.

Issue: https://github.com/flutter/flutter/issues/77838

[1]: https://docs.microsoft.com/en-us/windows/win32/winauto/screen-reader-parameter
2021-10-21 11:42:45 -07:00
Chris Bracken
746ed52a12 Add FlutterWindowsEngine::DispatchSemanticsAction (flutter/engine#29278)
Adds method for dispatching a semantics action received from the OS to
the matching node in Flutter's semantics tree.

Issue: https://github.com/flutter/flutter/issues/77838
2021-10-20 23:33:19 -07:00
moko256
28b5d6b9a4 [UWP] Remove 1px offset to make root widget fully shown (flutter/engine#27922) 2021-10-14 13:03:01 -07:00
Chris Bracken
794db8c01b Correct file line-endings from CRLF to LF (flutter/engine#29164) 2021-10-13 12:58:01 -07:00
Chris Bracken
5e2464a14d Cancel IME composing on clear text input client (flutter/engine#29146)
When a text input client is cleared, such as when the user changes focus
from one text input widget to another, or when the window itself loses
focus, cancel IME composing mode, close the composing candidates window
(if any), and reset the composing text.

Issue: https://github.com/flutter/flutter/issues/90503
2021-10-13 10:29:29 -07:00
James Clarke
d3f3b7368e Fix build flags for WinUWP (flutter/engine#29100) 2021-10-11 09:58:02 -07:00
Tong Mu
638b129319 [Windows] Add restart hooks, and reset keyboard (flutter/engine#28970)
With this PR, the state of the keyboard system will be reset when the engine is reset (typically during a hot restart.)
2021-10-04 14:02:22 -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
moko256
b8809dde77 Windows: Add dark theme support. (flutter/engine#28131)
This PR adds the dark theme support for both windows and winuwp engine, based on flutter/flutter#54612.

On Win32: using a registry value that is not documented. (I tested on Windows 10.0.19043.1165)
On UWP: using default background color. (I couldn't find WinRT API that returns dark/light directly, without xaml package.)

Flutter PR for win32: flutter/flutter#88520.
This PR will close flutter/flutter#54612.
This PR will complete one item in flutter/flutter#70214.
2021-09-28 11:03:18 -07:00
moko256
fecbc63bec [UWP] Implement clipboard. (flutter/engine#28064)
This PR implements clipboard in platform handler in UWP.
2021-09-27 17:01:42 -07:00
moko256
00ca12c712 [UWP] Add modifier keys support (flutter/engine#28724)
Implement GetModsForKeyState in keyboard_key_channel_handler.cc
2021-09-27 11:19:29 -07:00
Niklas Schulze
fec4d526e3 Windows: FlutterDesktopPixelBuffer: Add optional release callback (flutter/engine#28298) 2021-09-16 13:07:02 -07:00
moko256
34985c56b4 cleanup #28098 (flutter/engine#28334) 2021-09-09 13:17:01 -07:00
moko256
4836ff6b3c [UWP] Implement setting cursor icon. (flutter/engine#28098) 2021-08-26 17:15:46 -07:00
moko256
6239e74b25 [UWP] Add mouse button support (flutter/engine#28100) 2021-08-26 13:11:02 -07:00
Justin McCandless
e00871d812 hasStrings on Windows (flutter/engine#27749) 2021-08-24 17:54:01 -07:00
Tong Mu
3868bf03da Fix dead key handling on Win32 (again) (flutter/engine#28125)
- Fix dead character crashes the channel handler.
- Fix dead key messages are redispatched, making the message a regular character message.
2021-08-17 14:26:21 -07:00
Tong Mu
1704906f59 Fix dead key crashes on Win32 (flutter/engine#28047)
This PR fixes the crash caused by pressing dead keys on Win32.
2021-08-13 01:35:58 -07:00
Niklas Schulze
f6977e39d8 Windows: Add multi-touch support (flutter/engine#27863) 2021-08-12 21:02:01 -07:00
Tong Mu
9d45378f6f Windows keyboard integration tests and fix a number of issues (flutter/engine#27921)
* Basic changes

* Fix build

* Revert some changes

* Fix tests (ATP)

* Win32Message and inject messagelist

* wm builders

* Format

* Correct

* LowerCaseAUnhandled

* ShiftLeftKeyA

* Ctrl-A

* Ctrl-1

* Digit1OnFrenchLayout

* AltGrKeyQ

* Dead key E

* ^1

* Multibyte

* Format

* License

* Revert key.dart

* Move CreateKeyEventLparam

* MockEmbedderApiForKeyboard

* More MockEmbedderApiForKeyboard

* Doc

* Move MockMessageQueue

* is_deadchar doesnt seem needed

* ConvertChar32ToUtf8

* PeekNextMessageType

* 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-08-11 14:47:03 -07:00
moko256
846c5c5beb UWP: Fix uwptools that does not uninstall package (flutter/engine#27694) 2021-08-09 10:24:41 -07:00
Matej Knopp
41a21b299b Do not call CoreWindow::Visible from raster thread (flutter/engine#27760) 2021-08-07 22:26:28 +02:00
moko256
6b538a20bd fix a typo in https://github.com/flutter/engine/pull/27311 (flutter/engine#27687) 2021-08-05 13:05:02 -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
moko256
bd9583cd04 Windows: Implement GetPreferredLanguages for UWP and support l18n (flutter/engine#27311) 2021-07-23 16:41:57 -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
8a12a40f1c Add unit tests for Dart entrypoint arguments on Windows (flutter/engine#27497) 2021-07-19 12:55:27 -07:00
Matej Knopp
3c4ae00555 Fix duplicated keys with CONTROL key toggled (flutter/engine#27301) 2021-07-15 13:26:02 -07:00
Tong Mu
1bdcf5501f Windows: Fix AltGr key causing CtrlLeft to hang (flutter/engine#27266)
Fixes an issue where pressing AltGr key (on supporting layouts such as Spanish) on Windows causes CtrlLeft to hang pressed for both Flutter and Windows.

Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>
2021-07-11 21:38:22 -07:00
Matej Knopp
3502f849a5 Remove unnecessary variable assignment (flutter/engine#27227) 2021-07-08 01:31:51 +02:00
Matej Knopp
a0cd9e9785 Do not expect WM_CHAR if control or windows key is pressed (flutter/engine#27064) 2021-07-07 08:46:02 -07:00
Lau Ching Jun
f64df660b4 Windows: Allow win32 apps to initialize with different assets path or AOT filename (flutter/engine#27098) 2021-07-01 13:54:34 -07:00
Matej Knopp
09345c76b4 Windows: Resize synchronization shouldn't wait for vsync if window is hidden (flutter/engine#26857)
* Resize synchronization shouldn't wait for vsync if window is hidden
2021-06-30 12:56:14 +02:00
Tong Mu
6fc70b340b Fix windows keyboard: Extended key, delegate order (flutter/engine#26757)
* Adjust order

* Update code

* Fix Extended

* Add tests

* Better constants

* Format

* Comment

* Link
2021-06-17 04:59:58 -07: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
Chris Bracken
83ef606f12 [uwptool] Move Launch, Uninstall to AppStore class (flutter/engine#26315)
This refactoring moves the Application Launch and Uninstall methods to
the ApplicationStore class. This simplifies writing tests for Command
classes since the Application class is now a plain old data class, and
ApplicationStore can be replaced with a fake implementation for hermetic
testing, while I'll do in a follow-up patch.

Bug: https://github.com/flutter/flutter/issues/83072
2021-05-21 09:40:06 -07:00
Chris Bracken
2527c54071 [uwptool] Refactor command-handling to a map (flutter/engine#26309)
Extracts each of the commands (listapps, install, uninstall, launch)
into a command class that is registered at startup. This simplifies
adding further commands, and cleans up the code a bit.

This is a refactoring that introduces no changes to existing functionality.
2021-05-21 07:35:53 -07:00
Chris Bracken
fcbf9016d5 Adds uwptool install command (flutter/engine#26183)
Installs the package pointed to by a URI, as well as its dependencies.
2021-05-16 11:15:48 -07:00
James Clarke
dc724ea5d9 Windows: UWP ViewController accepts a CoreApplicationView and exposes to plugins (flutter/engine#25879) 2021-05-13 17:18:23 -07:00
Chris Bracken
b1600cc95f [uwptool] Add uninstall command (flutter/engine#26122)
Adds an uninstall command that uninstalls the specified application by
its package family name.

This currently attempts to remove for all users, but in future, we may
want to restrict install and uninstall to the current user only.

Also renames ApplicationStore::GetInstalledApplications() to
ApplicationStore::GetApps()
2021-05-13 11:28:20 -07:00
Chris Bracken
5f4bd9b2e5 [uwptool] Support lookup of full package name (flutter/engine#26121)
UWP apps must be launched using their package family name, but are
uninstalled using their full package name. This patch updates the
Application class to store both.

Further, when launching UWP apps, we now do a lookup to verify the
package exists before attempting to launch it.
2021-05-13 09:02:27 -07:00
Chris Bracken
25714c4696 Use PackageManager to locate installed UWP apps (flutter/engine#26120)
Replaces manual registry crawling with a lookup via
Windows.Management.Deployment.PackageManager. This eliminates the need
for the Registry class.

Covered by existing tests.

Issue: https://github.com/flutter/flutter/issues/81756
2021-05-13 08:03:03 -07:00
Chris Bracken
c364718981 Use a comma-separated args string for UWP (flutter/engine#26110)
UWP apps get a single arguments string on launch rather than an array.
The current implementation splits that args string on commas. This
updates the UWP launch args generation to match.

Part of https://github.com/flutter/flutter/issues/81756
Part of https://github.com/flutter/flutter/issues/82085
2021-05-12 17:11:11 -07:00