Comments (9)
Closing.
from flutter-embedded-linux.
Questions.
- Does flutter-elinux with X11 work without the issue?
- Do other wayland apps work?
If both are "Yes", this issue depends on only wayland backend of this software.
from flutter-embedded-linux.
Also, are you using --fullscreen
option?
from flutter-embedded-linux.
Thank you for reply.
Does flutter-elinux with X11 work without the issue?
Yes.
Do other wayland apps work?
Yes. (For example, weston-terminal works fine.)
Also, are you using --fullscreen option?
Yes. I use --fullscreen (-f) option.
I tried the following patch and it works.
diff --git a/src/flutter/shell/platform/linux_embedded/window/elinux_window_wayland.cc b/src/flutter/shell/platform/linux_embedded/window/elinux_window_wayland.cc
index fa147f6..0652954 100644
--- a/src/flutter/shell/platform/linux_embedded/window/elinux_window_wayland.cc
+++ b/src/flutter/shell/platform/linux_embedded/window/elinux_window_wayland.cc
@@ -628,6 +628,8 @@ const wl_output_listener ELinuxWindowWayland::kWlOutputListener = {
const char* model,
int32_t output_transform) -> void {
ELINUX_LOG(TRACE) << "wl_output_listener.geometry";
+ auto self = reinterpret_cast<ELinuxWindowWayland*>(data);
+ self->transform_ = output_transform;
},
.mode = [](void* data,
wl_output* wl_output,
@@ -639,7 +641,11 @@ const wl_output_listener ELinuxWindowWayland::kWlOutputListener = {
auto self = reinterpret_cast<ELinuxWindowWayland*>(data);
if (flags & WL_OUTPUT_MODE_CURRENT) {
- if (self->current_rotation_ == 90 || self->current_rotation_ == 270) {
+ if (self->current_rotation_ == 90 || self->current_rotation_ == 270
+ || self->transform_ == WL_OUTPUT_TRANSFORM_90
+ || self->transform_ == WL_OUTPUT_TRANSFORM_270
+ || self->transform_ == WL_OUTPUT_TRANSFORM_FLIPPED_90
+ || self->transform_ == WL_OUTPUT_TRANSFORM_FLIPPED_270) {
std::swap(width, height);
}
diff --git a/src/flutter/shell/platform/linux_embedded/window/elinux_window_wayland.h b/src/flutter/shell/platform/linux_embedded/window/elinux_window_wayland.h
index 2d1343d..dcfe1bb 100644
--- a/src/flutter/shell/platform/linux_embedded/window/elinux_window_wayland.h
+++ b/src/flutter/shell/platform/linux_embedded/window/elinux_window_wayland.h
@@ -153,6 +153,7 @@ class ELinuxWindowWayland : public ELinuxWindow, public WindowBindingHandler {
bool maximised_;
uint32_t last_frame_time_;
bool enable_impeller_ = false;
+ int32_t transform_ = WL_OUTPUT_TRANSFORM_NORMAL;
// Indicates that exists a keyboard show request from Flutter Engine.
bool is_requested_show_virtual_keyboard_;
from flutter-embedded-linux.
Makes sense. Could you please send a PR?
int32_t transform_ = WL_OUTPUT_TRANSFORM_NORMAL;
Can we use current_rotation_
var instead of the creation of transform_
?
from flutter-embedded-linux.
Can we use current_rotation_ var instead of the creation of transform_?
Unfortunately no.
current_rotation_
is used in GetRotationDegree()
uint16_t ELinuxWindowWayland::GetRotationDegree() const {
return current_rotation_;
}
but, the value of output_transform
is 0 to 7.
enum wl_output_transform {
WL_OUTPUT_TRANSFORM_NORMAL = 0,
WL_OUTPUT_TRANSFORM_90 = 1,
WL_OUTPUT_TRANSFORM_180 = 2,
WL_OUTPUT_TRANSFORM_270 = 3,
WL_OUTPUT_TRANSFORM_FLIPPED = 4,
WL_OUTPUT_TRANSFORM_FLIPPED_90 = 5,
WL_OUTPUT_TRANSFORM_FLIPPED_180 = 6,
WL_OUTPUT_TRANSFORM_FLIPPED_270 = 7,
};
from flutter-embedded-linux.
but, the value of output_transform is 0 to 7.
Isn't it sufficient to just convert the value when assigning it to current_rotation_
? Also, it feels incorrect because it would result in a discrepancy with the information on the Flutter Engine side.
from flutter-embedded-linux.
Apologies, it was a misunderstanding on my part. Your original patch is correct because this involves rotation on the Wayland compositor side, so there's no need to convey this information to the Flutter Engine side.
Can you please send the pull request?
from flutter-embedded-linux.
Thank you.
I sent a PR.
from flutter-embedded-linux.
Related Issues (20)
- Add FlutterEngineNotifyDisplayUpdate support HOT 2
- Debug - Can only start Dart VM service, not observatory HOT 1
- Support DRM-GBM Backend for IMX GPU Vivante 6 Driver HOT 4
- Atomic Modeset fails HOT 8
- waylnd: [FATAL:flutter/shell/common/display_manager.cc(32)] Check failed: displays_.empty(). HOT 14
- DRM mode on raspberry pi 4b Error: Couldn't find file "symbols/US" in include paths HOT 3
- "text_scaling_factor" should default to 1 if unset HOT 1
- Internal CI for Engine artifacts doesn't work HOT 2
- xdg_wm_base@11: error 4: xdg_surface buffer (1280 x 720) is larger than the configured fullscreen state (1024 x 600) HOT 3
- Missing calls to "registerWith()" in generated dart_plugin_registrant.dart HOT 1
- Missing calls to "registerWith()" in generated dart_plugin_registrant.dart HOT 16
- Does this project run without systemd? HOT 1
- Disconnecting mouse that is hovering over button on wayland client results in Segmentation fault HOT 4
- how to measure flutter performance on embedded device HOT 4
- Support multiple wl_seats for remote desktop sharing HOT 3
- Dart VM: Wrong full snapshot version, expected XXX, found YYY HOT 2
- Incorrect snapshot architecture HOT 7
- App crashes when non-ASCII characters are sent from input method
- Consider replace systemd with libuv? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-embedded-linux.