diff options
-rw-r--r-- | src/client/qwaylandxdgsurface.cpp | 42 |
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); |