Skip to content

Commit

Permalink
Enable setGeometry in TizenWindowElementary (#347)
Browse files Browse the repository at this point in the history
* setWindowGeometry of the window channel is now also available.
* But it is still disabled in the wearable profile.

Signed-off-by: Boram Bae <[email protected]>
  • Loading branch information
bbrto21 authored Sep 19, 2022
1 parent f662810 commit 3e27c1f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions shell/platform/tizen/tizen_window_elementary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ bool TizenWindowElementary::CreateWindow() {
return false;
}

// Please uncomment below and enable setWindowGeometry of window channel when
// Tizen 5.5 or later was chosen as default.
// elm_win_aux_hint_add(elm_win_, "wm.policy.win.user.geometry", "1");
#ifndef WEARABLE_PROFILE
elm_win_aux_hint_add(elm_win_, "wm.policy.win.user.geometry", "1");
#endif

Ecore_Evas* ecore_evas =
ecore_evas_ecore_evas_get(evas_object_evas_get(elm_win_));
Expand Down Expand Up @@ -332,8 +332,14 @@ TizenGeometry TizenWindowElementary::GetGeometry() {
}

bool TizenWindowElementary::SetGeometry(TizenGeometry geometry) {
#ifndef WEARABLE_PROFILE
evas_object_resize(elm_win_, geometry.width, geometry.height);
evas_object_move(elm_win_, geometry.left, geometry.top);
return true;
#else
FT_LOG(Error) << "SetGeometry is not supported.";
return false;
#endif
}

TizenGeometry TizenWindowElementary::GetScreenGeometry() {
Expand Down

0 comments on commit 3e27c1f

Please sign in to comment.