Skip to content

Commit

Permalink
Merge branch 'window_sized' into 'master'
Browse files Browse the repository at this point in the history
[Compositor] implement requestWindowSize function. Fixes MER#1958

See merge request mer-core/lipstick!90
  • Loading branch information
adenexter committed Dec 18, 2018
2 parents f8fa384 + 26ed81e commit 8f897ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/compositor/lipstickcompositorwindow.cpp
Expand Up @@ -574,6 +574,14 @@ void LipstickCompositorWindow::setFocusOnTouch(bool focusOnTouch)
emit focusOnTouchChanged();
}

void LipstickCompositorWindow::resize(const QSize &size)
{
if (surface()->size() != size) {
surface()->requestSize(size);
emit resized();
}
}

static bool hwc_windowsurface_is_enabled()
{
if (!HwcRenderStage::isHwcEnabled())
Expand Down
2 changes: 2 additions & 0 deletions src/compositor/lipstickcompositorwindow.h
Expand Up @@ -71,6 +71,7 @@ class LIPSTICK_EXPORT LipstickCompositorWindow : public QWaylandSurfaceItem
bool focusOnTouch() const;
void setFocusOnTouch(bool focusOnTouch);

Q_INVOKABLE void resize(const QSize &size);

protected:
void itemChange(ItemChange change, const ItemChangeData &data);
Expand All @@ -89,6 +90,7 @@ class LIPSTICK_EXPORT LipstickCompositorWindow : public QWaylandSurfaceItem
void mouseRegionBoundsChanged();
void committed();
void focusOnTouchChanged();
void resized();

private slots:
void handleTouchCancel();
Expand Down

0 comments on commit 8f897ee

Please sign in to comment.