1. 15 Oct, 2019 1 commit
    • David Edmundson's avatar
      [tabbox] Correctly set global short on kwin tabbox · 5d4be83d
      David Edmundson authored
      Summary:
      We need to set both the current autoload shortcut and the default
      shortcut. setGlobalShortcut is a convenience method for both.
      
      Otherwise clicking defaults in the keys KCM will discard the shortcut
      forever.
      
      BUG: 407000
      
      Test Plan:
      wiped kglobalshortcutsrc to get a clean slate
      restarted kwin
      alt+tab
      hit defauts in the kwin KCM
      could still alt+tab
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24647
      5d4be83d
  2. 29 Sep, 2019 1 commit
  3. 26 Sep, 2019 1 commit
  4. 11 Sep, 2019 1 commit
  5. 10 Sep, 2019 1 commit
  6. 27 Aug, 2019 1 commit
    • Vlad Zahorodnii's avatar
      [effects/desktopgrid] Don't change activities · e918cb5d
      Vlad Zahorodnii authored
      Summary:
      If the Desktop Grid effect doesn't use the Present Windows effect to
      layout windows, windowAt helper can return a window that doesn't belong
      to current activity because it doesn't check whether that window belongs
      to current activity.
      
      This change addresses that problem by adding corresponding check.
      
      BUG: 301447
      FIXED-IN: 5.13.4
      
      Test Plan:
      //Unchecked "Use Present Windows effect to layout the windows".//
      
      * Switched to activity #1
      * Switched to virtual desktop #1
      * Launched Konsole and maximized it(to increate hit area)
      * Switched to activity #2
      * Switched to virtual desktop #2
      * Launched Dolphin and maximized it
      * Activated the Desktop Grid effect, clicked on virtual desktop #1 (activity #2 is still active)
      * Switched to activity #1
      * Activated the Desktop Grid effect, clicked on virtual desktop #2 (activity #1 is still active)
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D14046
      e918cb5d
  7. 31 Jul, 2019 1 commit
  8. 15 Jul, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Don't crash when highlighted tabbox client is closed · d948d247
      Vlad Zahorodnii authored
      Summary:
      The compositor tries to switch to the next tabbox client when currently
      highlighted client is closed. Though there is a small issue with that.
      Because the switch happens too late, a dangling pointer can be inserted
      into the unconstrained stacking order, which can lead to a crash later on.
      
      There are two cases:
      - compositing is on;
      - compositing is off.
      
      Compositing is on: TabBox will try to un-elevate currently highlighted
      client, though by that time the client no longer owns EffectWindow, so
      this is basically a no-op (that's why we haven't experienced this bug
      before).
      
      Compositing is off: TabBox will try to restack currently hightlighted
      client under the next tabbox client. Given that the restack method
      doesn't do any sanity checks(see Client::manage why), a client that is
      about to be destroyed will be re-inserted back into the unconstrained
      stacking order.
      
      This change ensures that the switch happens before currently highlighted
      client is removed from the stacking order.
      
      BUG: 406784
      
      Test Plan:
      - Turn off compositing;
      - Follow steps to reproduce in the bug report (see comment 2).
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D20916
      d948d247
  9. 10 Jul, 2019 1 commit
    • Fabian Vogt's avatar
      Fix creation of kdeglobals if /etc/xdg/kdeglobals present · c3c030d8
      Fabian Vogt authored
      Summary:
      If /etc/xdg/kdeglobals exists but ~/.config/kdeglobals
      does not (like on the first start of kwin_wayland), it did not notice
      changes to kdeglobals.
      This lead to KWin using the wrong color scheme for the window decoration
      on the first login, which also could not be changed without a session restart.
      
      Test Plan: Cleared ~ and logged in again, title bar color is now correct.
      
      Reviewers: #plasma, romangg
      
      Reviewed By: #plasma, romangg
      
      Subscribers: sitter, broulik, rikmills, kwin, plasma-devel
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D22238
      c3c030d8
  10. 20 Jun, 2019 1 commit
  11. 27 May, 2019 1 commit
    • Vlad Zahorodnii's avatar
      [effects/screenshot] Upload data to xpixmap in chunks · 67444e36
      Vlad Zahorodnii authored
      Summary:
      xcb_put_image doesn't handle big images well. Contrary to XPutImage, the
      caller must manually split the data in such a way that each xcb_put_image
      request doesn't exceed the maximum request length. Not doing so will result
      in libxcb shutting down the connection.
      
      CCBUG: 338489
      CCBUG: 388182
      
      Test Plan: Take a screenshot of an active fullscreen client on a 4K monitor.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D21370
      67444e36
  12. 17 Apr, 2019 1 commit
  13. 08 Apr, 2019 1 commit
  14. 06 Apr, 2019 1 commit
  15. 31 Mar, 2019 1 commit
    • David Edmundson's avatar
      Avoid potential assert in SM saving · 83545593
      David Edmundson authored
      Summary:
      Sesison Manager stores all relevant clients. There's an assert if the
      window type is outside of the standard client window types. It assumed
      that all windows outside this would be Unmanaged windows rather than
      Client objects, something probably true but not something enforced.
      
      This particular crash was probably cased as we have a new window type in
      Plasma OSD, which does not set BypassWindowManager in Qt window flags.
      
      BUG: 395712
      
      Test Plan:
      Set to restore session
      Logged out and back in
      Saw some windows
      
      Set to restore manually saved session
      Hit save
      No crash
      
      Reviewers: #kwin, graesslin
      
      Reviewed By: #kwin, graesslin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D13715
      83545593
  16. 27 Mar, 2019 1 commit
    • Erik Kurzinger's avatar
      [platforms/x11] Force glXSwapBuffers to block with NVIDIA driver · 3ce5af5c
      Erik Kurzinger authored and Vlad Zahorodnii's avatar Vlad Zahorodnii committed
      Summary:
      The NVIDIA implementation of glXSwapBuffers will, by default, queue up
      to two frames for presentation before blocking. KWin's compositor,
      however, assumes that calls to glXSwapBuffers will always block until
      the next vblank when rendering double buffered. This assumption isn't
      valid, as glXSwapBuffers is specified as being an implicit glFlush,
      not an implicit glFinish, and so it isn't required to block. When this
      assumption is violated, KWin's frame timing logic will
      break. Specifically, there will be extraneous calls to
      setCompositeTimer with a waitTime of 0 after the non-blocking buffer
      swaps, dramatically reducing desktop responsiveness. To remedy this,
      a call to glXWaitGL was added by Thomas Luebking after glXSwapBuffers
      in 2015 (see bug 346275, commit
      8bea96d7). That glXWaitGL call is
      equivalent to a glFinish call in direct rendering, so it was a good
      way to make glXSwapBuffers behave as though it implied a glFinish
      call.
      
      However, the NVIDIA driver will by default do a busy wait in glFinish,
      for reduced latency. Therefore that change dramatically increased CPU
      usage. GL_YIELD can be set to USLEEP (case insensitive) to change
      the behavior and use usleep instead. When using the NVIDIA driver,
      KWin will disable vsync entirely if GL_YIELD isn't set to USLEEP
      (case sensitive, a bug in KWin).
      
      However, the NVIDIA driver supports another environment variable,
      __GL_MaxFramesAllowed, which can be used to control how many frames
      may be queued by glXSwapBuffers. If this is set to 1 the function
      will always block until retrace, in line with KWin's expectations.
      This allows the now-unnecessary call to glXWaitGL to be removed along
      with the logic to conditionally disable vsync, providing a better
      experience on NVIDIA hardware.
      
      Reviewers: #kwin, davidedmundson, zzag
      
      Reviewed By: #kwin, davidedmundson, zzag
      
      Subscribers: kwin, davidedmundson, zzag
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D19867
      3ce5af5c
  17. 22 Mar, 2019 1 commit
  18. 13 Mar, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Properly restore current desktop from session · f7af1132
      Vlad Zahorodnii authored
      Summary:
      VirtualDesktopManager is initialized in two places: Workspace::init and
      Workspace::initWithX11. The former method loads virtual desktops from
      the config file and the latter method synchronizes VirtualDesktopManager
      with RootInfo.
      
      Both methods do
      
          if (!VirtualDesktopManager::self()->setCurrent(m_initialDesktop))
              VirtualDesktopManager::self()->setCurrent(1);
      
      which makes sense in Workspace::init, but not in Workspace::initWithX11.
      
      When Workspace::initWithX11 is called, the current virtual desktop is
      the same as m_initialDesktop. So that piece of code basically makes
      the first virtual desktop current no matter what.
      
      BUG: 390295
      FIXED-IN: 5.15.3
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D19520
      f7af1132
  19. 05 Mar, 2019 1 commit
  20. 17 Feb, 2019 1 commit
  21. 05 Feb, 2019 2 commits
  22. 22 Jan, 2019 1 commit
  23. 16 Jan, 2019 1 commit
  24. 12 Nov, 2018 1 commit
  25. 02 Nov, 2018 1 commit
  26. 01 Nov, 2018 1 commit
  27. 28 Oct, 2018 1 commit
    • Erik Kurzinger's avatar
      [effects/presentwindows] Avoid potential freeze during fill-gaps · 4348cd56
      Erik Kurzinger authored and Vlad Zahorodnii's avatar Vlad Zahorodnii committed
      Summary:
      When using the natural layout algorithm with the fill-gaps option, a small
      error (less than one) is introduced in windows' aspect ratio each time they are
      enlarged due to floating-point roundoff.
      
      Currently, the algorithm computes the width and height enlargement factors and
      then attempts to enlarge in each of the four possible directions, repeating
      until it can't enlarge any windows any further.  Hence, this aspect ratio error
      can be multiplied by up to four. Especially for small, long, and narrow
      windows, this can result in a total error of greater than one by the end of
      that loop iteration. If this occurs, on subsequent iterations the height
      enlargement factor might then be computed as negative violating some of the
      core assumptions of the algorithm and resulting in the loop iterating endlessly
      until one of the window dimensions overflows, freezing the program for up to
      several minutes.
      
      To fix this, the height enlargement factor should be re-computed based on the
      new width each time the window is enlarged, ensuring the error introduced in
      the aspect ratio never exceeds one.
      
      BUG: 364709
      BUG: 380865
      BUG: 368811
      
      FIXED-IN: 5.15.0
      
      Test Plan:
      The most reliable way to reproduce the freeze seems to be to activate the
      desktop-grid effect while a tool-tip window is fading in.
      Ensure desktop-grid is configured to use present windows, and that present
      windows is configured to use the natural layout algorithm with the fill gaps
      option selected.
      
      The freeze is still intermittent, but using this method should be able to be
      triggered within about 10 tries without this fix.
      After applying the fix, the freeze has never been observed.
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: graesslin, kwin, zzag
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16278
      4348cd56
  28. 26 Oct, 2018 1 commit
    • Erik Kurzinger's avatar
      [effects/desktopgrid] Specify screen projection matrix when drawing moving window · 408ed806
      Erik Kurzinger authored and Vlad Zahorodnii's avatar Vlad Zahorodnii committed
      Summary:
      Currently, when the user is moving a window in the desktop grid it is drawn from
      the paintScreen function to ensure it appears above all other windows. However,
      when drawing the window, the screenProjectionMatrix for the WindowPaintData structure
      is never specified. Because of this, the window will not be visible if OpenGL
      compositing along with Lanczos scaling are in use since its coordinates will never
      be projected into screen-space (unless the window is maximized, in which case the
      scaling code is bypassed).
      
      BUG: 361371
      BUG: 364509
      
      FIXED-IN: 5.14.3
      
      Test Plan:
      Ensure OpenGL compositing is enabled and the scaling method is set to "Accurate" on
      hardware supporting this option. Additionally, ensure the desktop grid effect is
      active and is configured to use Present Windows. Open a window and ensure is it not
      maximized. Click on the window and drag it around - its contents should remain visible
      the entire time and follow the mouse.
      
      Reviewers: #kwin, zzag, graesslin, davidedmundson
      
      Reviewed By: #kwin, zzag, davidedmundson
      
      Subscribers: broulik, davidedmundson, kwin, #kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16430
      408ed806
  29. 24 Oct, 2018 1 commit
  30. 12 Oct, 2018 1 commit
  31. 29 Sep, 2018 1 commit
  32. 25 Sep, 2018 1 commit
  33. 08 Sep, 2018 1 commit
  34. 04 Sep, 2018 1 commit
  35. 30 Aug, 2018 2 commits
  36. 27 Aug, 2018 1 commit
  37. 26 Aug, 2018 1 commit
  38. 15 Aug, 2018 1 commit