summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Coval <philippe.coval@open.eurogiciel.org>2014-11-05 18:40:52 +0100
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>2014-11-05 18:40:52 +0100
commit59cc24a9edcabec4f2ab00f17b79248bda6e365f (patch)
tree7619076648e372cad6a9cf00dd40564c1b1e8f3a
parent7e4b841042c5ae02ea9b0675f2406769682beb66 (diff)
downloadqtwayland-sandbox/pcoval/devel.tar.gz
qtwayland-sandbox/pcoval/devel.tar.bz2
qtwayland-sandbox/pcoval/devel.zip
Change-Id: Ib4aaf9e41b08150d44f27f0173304415ed167dfd Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
-rw-r--r--src/client/qwaylandxdgsurface.cpp42
1 files changed, 12 insertions, 30 deletions
diff --git a/src/client/qwaylandxdgsurface.cpp b/src/client/qwaylandxdgsurface.cpp
index bfca456e..6daf9638 100644
--- a/src/client/qwaylandxdgsurface.cpp
+++ b/src/client/qwaylandxdgsurface.cpp
@@ -205,26 +205,23 @@ void QWaylandXdgSurface::xdg_surface_configure(int32_t width, int32_t height, st
{
uint32_t *pos = 0;
uint32_t state=0;
- QMargins m = m_window->frameMargins();
- uint32_t statesbits = 0;
qDebug()<<"#"<<__PRETTY_FUNCTION__<<width<<"*"<<height;
- //wl_array_for_each( pstate, states) {
for (pos = (uint32_t*) (states)->data;
(const char *) pos < ((const char *) (states)->data + (states)->size);
(pos)++)
{
state=*pos;
- statesbits |= state;
qDebug()<<state;
switch (state) {
case XDG_SURFACE_STATE_MAXIMIZED:
- // m_maximized = true;
+ m_maximized = true;
break;
case XDG_SURFACE_STATE_FULLSCREEN:
- // m_fullscreen = true;
+ //m_window->setWindowState( Qt::WindowFullScreen );
+ m_fullscreen = true;
break;
case XDG_SURFACE_STATE_RESIZING:
m_size = QSize(width,height);
@@ -236,36 +233,21 @@ void QWaylandXdgSurface::xdg_surface_configure(int32_t width, int32_t height, st
break;
}
}
- if ( statesbits & XDG_SURFACE_STATE_ACTIVATED )
- {
- m_maximized = ( statesbits & XDG_SURFACE_STATE_MAXIMIZED );
- m_fullscreen = ( statesbits & XDG_SURFACE_STATE_FULLSCREEN );
- }
-{
- if ( width == 0 && height == 0
- ) {
+ if ( width == 0 && height == 0 ) {
width = m_size.width();
height = m_size.height();
}
if ( width > 0 && height > 0) {
- qDebug()<<"size="<<width<<"x"<<height;
- // m_window->configure(0, width + m.left() + m.right(), height + m.top() + m.bottom());
- m_window->configure(0, width + m.left() + m.right(), height + m.top() + m.bottom());
- }
-
-
-
- }
-
- if ( ( ! m_maximized || ! m_fullscreen )
- && ( m_size.width() != width || m_size.height() != height )
- && ( m_size.width() > 0 && m_size.height() > 0 )
- ) {
- //m_window->configure(0, m_size.width() + m.left() + m.right(), m_size.height() + m.top() + m.bottom());
-
- } else {
+ qDebug()<<"size="<<width<<"x"<<height<<"fs="<<m_fullscreen;
+ if ( m_fullscreen ) {
+ //width = height = 400;
+ m_window->configure(0, width , height );
+ } else {
+ QMargins m = m_window->frameMargins();
+ m_window->configure(0, width + m.left() + m.right(), height + m.top() + m.bottom());
+ }
}
xdg_surface_ack_configure(object(), serial);