@@ -92,7 +92,7 @@ void FlutterTizenEngine::InitializeRenderer(int32_t x,
9292 bool transparent,
9393 bool focusable,
9494 bool top_level) {
95- TizenRenderer::WindowGeometry geometry = {x, y, width, height};
95+ TizenRenderer::Geometry geometry = {x, y, width, height};
9696
9797#ifdef TIZEN_RENDERER_EVAS_GL
9898 renderer_ = std::make_unique<TizenRendererEvasGL>(
@@ -267,6 +267,10 @@ bool FlutterTizenEngine::RunEngine(const char* entrypoint) {
267267 text_input_channel_ = std::make_unique<TextInputChannel>(
268268 internal_plugin_registrar_->messenger (),
269269 std::make_unique<TizenInputMethodContext>(this ));
270+ #ifndef __X64_SHELL__
271+ window_channel_ = std::make_unique<WindowChannel>(
272+ internal_plugin_registrar_->messenger (), renderer_.get (), this );
273+ #endif
270274 key_event_handler_ = std::make_unique<KeyEventHandler>(this );
271275 touch_event_handler_ = std::make_unique<TouchEventHandler>(this );
272276
@@ -343,11 +347,15 @@ void FlutterTizenEngine::SendPointerEvent(const FlutterPointerEvent& event) {
343347 embedder_api_.SendPointerEvent (engine_, &event, 1 );
344348}
345349
346- void FlutterTizenEngine::SendWindowMetrics (int32_t width,
350+ void FlutterTizenEngine::SendWindowMetrics (int32_t x,
351+ int32_t y,
352+ int32_t width,
347353 int32_t height,
348354 double pixel_ratio) {
349355 FlutterWindowMetricsEvent event = {};
350356 event.struct_size = sizeof (FlutterWindowMetricsEvent);
357+ event.left = static_cast <size_t >(x);
358+ event.top = static_cast <size_t >(y);
351359 event.width = static_cast <size_t >(width);
352360 event.height = static_cast <size_t >(height);
353361 if (pixel_ratio == 0.0 ) {
@@ -377,7 +385,7 @@ void FlutterTizenEngine::SetWindowOrientation(int32_t degree) {
377385 renderer_->SetRotate (degree);
378386 // Compute renderer transformation based on the angle of rotation.
379387 double rad = (360 - degree) * M_PI / 180 ;
380- auto geometry = renderer_->GetCurrentGeometry ();
388+ auto geometry = renderer_->GetWindowGeometry ();
381389 double width = geometry.w ;
382390 double height = geometry.h ;
383391
@@ -397,20 +405,33 @@ void FlutterTizenEngine::SetWindowOrientation(int32_t degree) {
397405 };
398406 touch_event_handler_->rotation = degree;
399407 if (degree == 90 || degree == 270 ) {
400- renderer_->ResizeWithRotation (geometry.x , geometry.y , height, width,
401- degree);
402- SendWindowMetrics (height, width, 0.0 );
403- } else {
404- renderer_->ResizeWithRotation (geometry.x , geometry.y , width, height,
405- degree);
406- SendWindowMetrics (width, height, 0.0 );
408+ std::swap (width, height);
407409 }
410+ renderer_->ResizeWithRotation (geometry.x , geometry.y , width, height, degree);
411+ // Window position does not change on rotation regardless of its orientation.
412+ SendWindowMetrics (geometry.x , geometry.y , width, height, 0.0 );
408413}
409414
410415void FlutterTizenEngine::OnOrientationChange (int32_t degree) {
411416 SetWindowOrientation (degree);
412417}
413418
419+ void FlutterTizenEngine::OnGeometryChange (int32_t x,
420+ int32_t y,
421+ int32_t width,
422+ int32_t height) {
423+ #ifdef TIZEN_RENDERER_EVAS_GL
424+ FT_UNIMPLEMENTED ();
425+ #else
426+ if (!renderer_->IsValid ()) {
427+ return ;
428+ }
429+ renderer_->SetGeometry (x, y, width, height);
430+ renderer_->ResizeWithRotation (x, y, width, height, 0 );
431+ SendWindowMetrics (x, y, width, height, 0.0 );
432+ #endif
433+ }
434+
414435void FlutterTizenEngine::OnVsync (intptr_t baton,
415436 uint64_t frame_start_time_nanos,
416437 uint64_t frame_target_time_nanos) {
@@ -456,8 +477,8 @@ bool FlutterTizenEngine::MarkExternalTextureFrameAvailable(int64_t texture_id) {
456477 engine_, texture_id) == kSuccess );
457478}
458479
459- // The Flutter Engine calls out to this function when new platform messages are
460- // available.
480+ // The Flutter Engine calls out to this function when new platform messages
481+ // are available.
461482
462483// Converts a FlutterPlatformMessage to an equivalent FlutterDesktopMessage.
463484FlutterDesktopMessage FlutterTizenEngine::ConvertToDesktopMessage (
0 commit comments