Skip to content
  • rk flx's avatar
    Clean up code tracking fullscreen state · 140393d0
    rk flx authored
    Summary:
    After syncing Gwenview's fullscreen mode with that of the window manager
    in 0d917337, we can just ask the window for its fullscreen state
    instead of having to track this for ourselves.
    
    This gets rid of a bunch of `bools` and reduces chances those might
    accidentally get out of sync at some point. In addition, we can
    eliminate duplication and dependence on execution order in
    `MainWindow::toggleFullScreen`.
    
    Test Plan:
    - `qDebug()` comparing `mFullScreenMode` and `window()->isFullscreen()`
    - Manual testing of every functionality affected:
      - Switching to and from fullscreen mode (both via Gwenview and window manager).
      - {key Esc} to exit fullscreen mode.
      - Special fullscreen toolbar works.
      - Toggling sidebar resizes fullscreen toolbar.
      - Sidebar state remembered separately for normal and fullscreen mode.
      - Savebar not visible in fullscreen mode.
      - Memory warning bar still works in fullscreen mode.
    
    Reviewers: muhlenpfordt
    
    Reviewed By: muhlenpfordt
    
    Differential Revision: https://phabricator.kde.org/D10412
    140393d0