1. 27 Oct, 2018 1 commit
  2. 25 Oct, 2018 1 commit
  3. 24 Oct, 2018 3 commits
  4. 10 Oct, 2018 1 commit
    • David Edmundson's avatar
      [qpa] Always keep a at least one screen · 6724955a
      David Edmundson authored
      Qt does not like having no screens. Both Qt XCB and Wayland QPAs have
      systems pretend there's always at least 1 screen
      Kwin already uses a dummy screen on startup, this patch reinserts the
      dummy screen if the platform states that all real screens are removed.
      BUG: 399564
      Test Plan:
      Logged in, everything still worked
      Did not reproduce the original bug
      Reviewers: #kwin, zzag
      Reviewed By: #kwin, zzag
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D16096
  5. 05 Oct, 2018 3 commits
  6. 22 Sep, 2018 1 commit
  7. 31 Aug, 2018 7 commits
    • Vlad Zahorodnii's avatar
      [scenes/opengl] Fix overlaps in shadow texture atlas · dadcd511
      Vlad Zahorodnii authored
      If the corner shadow tiles(top-left, top-right, and so on) tiles are missing,
      then the left/top/right/bottom shadow tiles will overlap.
      This diff addresses that problem by changing how the shadow texture
      atlas is rendered:
      * corner tiles will be drawn in the corners of the atlas(buildQuads
        method expects them to be at the corners);
      * top, right, bottom, and left tile will be aligned to the top-left
        corner of the inner shadow rect.
      For majority of desktop themes, the shadow texture atlas looks the same.
      For example, here's for Aether:
      {F6190484, layout=center, size=full}
      {F6190488, layout=center, size=full}
      Depends on D14783
      Reviewers: #kwin, davidedmundson
      Reviewed By: #kwin, davidedmundson
      Subscribers: davidedmundson, abetts, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D14784
    • Vlad Zahorodnii's avatar
      [scenes/opengl] Correctly draw shadows when corner tiles are missing · 5e55664d
      Vlad Zahorodnii authored
      Current implementation of buildQuads assumes that corner shadow tiles
      are always present:
          const QRectF leftRect(
      but that assumption is wrong. For example, if the default panel is on
      the bottom screen edge, then the calendar popup won't have the
      bottom-left shadow tile(at least on Wayland). Which means that the left
      shadow tile won't be visible because
      topLeftRect.left() == bottomLeftRect.right().
      Corner rectangles only have to influence height of the left/right tile
      and width of the top/bottom tile. Width of the left/right tile and
      height of the top/bottom tile should not be controlled by corner tiles.
      Overall, this is how shadow quads are computed:
      * Compute the outer rectangle;
      * Compute target rectangle for each corner tile. If some corner tile is
        missing, move the target rectangle to the corresponding corner of the
        inner shadow rect and set its width and height to 0. We need to do
        that to prevent top/right/bottom/left tiles from spanning over
      {F6190219, layout=center, size=full}
      We would rather prefer something like this if the top-left tile is
      {F6190233, layout=center, size=full}
      * Fix overlaps between corner tiles;
      * Compute target rectangles for top, right, bottom, and left tiles;
      * Fix overlaps between left/right and top/bottom shadow tiles.
      Test Plan:
      * Ran tests;
      * Resized Konsole to its minimimum size(on X11 and Wayland);
      * Opened the calendar popup(on X11 and Wayland):
      {F6190344, layout=center, size=full}
      {F6190346, layout=center, size=full}
      Reviewers: #kwin, davidedmundson
      Reviewed By: #kwin, davidedmundson
      Subscribers: abetts, davidedmundson, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D14783
    • Roman Gilg's avatar
      [platforms/virtual] Set raw physical size of outputs · 95cb47ca
      Roman Gilg authored
      Summary: At least one test requires the physical size to be set.
      Test Plan:
      Lock screen screen edges test is passing again. Without the change the corner
      offset in the ScreenEdges class is not calculated correctly via the
      physicalDpiX() and physicalDpiY() values of an auxilliary QWidget.
      Reviewers: #kwin, davidedmundson
      Reviewed By: #kwin, davidedmundson
      Subscribers: davidedmundson, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D15183
    • Roman Gilg's avatar
      [colorcorrection] Set gamma through Output class · 9cf2730f
      Roman Gilg authored
      With the new Output class we can set the gamma directly here. This is also
      a stepping stone to adjust individual output gamma adjustment later on.
      This means any future backend, which aims to support the color correction
      frontend needs to use the Output class.
      Test Plan: Night Color test still passes.
      Reviewers: #kwin
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D11803
    • Roman Gilg's avatar
      [platforms/virtual] Let VirtualOutput inherit Output · b22c362b
      Roman Gilg authored
      Let VirtualOutput be a child class of the new generic class Output.
      This allows code sharing and a very similar behavior of the Virtual backend
      in comparision to the Drm backend.
      Test Plan:
      Autotests succesful with two exceptions: The decoration input test fails on
      testDoubleTap, row topLeft. This is to be expected because now the
      ScreenEdgeInputFilter captures the event at position (0,0) before the
      DecorationEventFilter can capture it. The autotest was adapted to take this
      special case into account.
      Also the lockscreen test fails, because the virtual output is currently missing
      the physical size yet.
      Reviewers: #kwin
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D11789
    • Roman Gilg's avatar
      Introduce OutputScreens class · 34823782
      Roman Gilg authored
      Lift high-level properties into new Screens child class for platform plugins
      using the Output class.
      Directly make DrmScreens a child class of OutputScreens.
      Test Plan: Manually and auto tests with 94%.
      Reviewers: #kwin
      Differential Revision: https://phabricator.kde.org/D11782
    • Roman Gilg's avatar
      Introduce generic Output class · fe63e21f
      Roman Gilg authored
      In order to separate high-level properties of individual outputs from
      hardware-specific ones and access these, introduce a new generic class Output.
      Also make the DrmOutput class directly a child class of this generic class.
      The long-term goal is to get rid of the Screens global object on Wayland and
      instead directly work with Output objects on compositing level.
      This should enable us long-term to do direct scanout to hardware planes, what
      I predict needs this generic output representation at one point.
      Test Plan: Manually.
      Reviewers: #kwin
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D11781
  8. 29 Aug, 2018 1 commit
  9. 13 Aug, 2018 1 commit
    • Nerdopolis Turfwalker's avatar
      [platforms/fbdev] Attempt to set the framebuffer color layout on the framebuffer device · 304528e8
      Nerdopolis Turfwalker authored
      Weston does something similar
       ...and it seems that the non-primary framebuffer devices start completely off. (the screen is off on my Displayport device, and the window for the second vga card in qemu is much smaller than the primary one, and all black for my qemu vm) .
      In my testing, sending the ioctl FBIOPUT_VSCREENINFO with a *changed* &varinfo allows it to wake up, and turns on the screen.
      doing FBIOGET_VSCREENINFO and then FBIOPUT_VSCREENINFO in my testing does not work.
      I think really the values that end up getting changed are varinfo.transp.offset and varinfo.transp.length. at least on the qemu system, but in this patch I am aligning all of them for completeness, because the drivers might do it differently for qemu
      Test Plan: This causes the window for /dev/fb1 (remote-viewer, and a qemu vm with two "VGA" (bochsdrm) cards) to resize from the smaller size when specifying it as the --fb-device on seat0, and kwin draws on the device.
      Reviewers: #kwin, davidedmundson, graesslin
      Reviewed By: #kwin, graesslin
      Subscribers: zzag, davidedmundson, rkflx, graesslin, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D9572
  10. 06 Aug, 2018 1 commit
    • David Edmundson's avatar
      Fractional scaling in DRM kscreen integration · 7aedacd8
      David Edmundson authored
      The kwin code was written to treat scale as non integers, we just need
      to switch to the relevant float version of methods.
      Test Plan:
      Used kscreen-doctor to change this
      Konsole resized as appropriate
      Plasmashell was all broken, but that's expected until QScreen::size is based on the
      xdg-output virtual size
      Reviewers: #kwin, mart, graesslin, romangg
      Reviewed By: #kwin, mart, graesslin
      Subscribers: romangg, zzag, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D13616
  11. 23 Jul, 2018 2 commits
  12. 22 Jul, 2018 1 commit
  13. 19 Jul, 2018 1 commit
  14. 18 Jul, 2018 1 commit
  15. 13 Jul, 2018 2 commits
  16. 24 Jun, 2018 1 commit
  17. 23 Jun, 2018 2 commits
    • David Edmundson's avatar
      DRM cursor scaling · 2cc42ecc
      David Edmundson authored
      We pass the buffer scale of the cursor through QImage::devicePixelRatio.
      When copying the cursor with QPainter use Qt's in-built functionality to
      handle resizing the cursor pixmap as necessary to match the screen.
      As we're now resizing the cursor, the hotspot needs translating from
      logical to device co-ordinates.
      Test Plan: Used with associated patches
      Reviewers: #kwin, graesslin
      Reviewed By: #kwin, graesslin
      Subscribers: graesslin, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D13605
    • David Edmundson's avatar
      Support cursor scaling in X windowed backend · 9ff1f77e
      David Edmundson authored
      Test Plan:
      Ran kwin_wayland --windowed  --scale2
      Hovered over deco. Got massive and detailed cursor
      Hovered over a wayland client (Qt 5.11 not dev)
      Got a massive, but slightly blocky cursor
      Reviewers: #kwin, graesslin
      Reviewed By: #kwin, graesslin
      Subscribers: zzag, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D13642
  18. 20 Jun, 2018 1 commit
    • David Edmundson's avatar
      Workaround crash in Aurorae destruction · 275b7ee0
      David Edmundson authored
      Workaround QtBug-68997
      Deleting of a RenderControl/render controlled window triggers deletion
      of other queued deleted items, putting KWin in a corrupt state. See Qt
      bug report.
      Deleting this queued means we know we don't have anything else going on
      in the stack which should make this somewhat safe.
      BUG: 395346
      Test Plan:
      Couldn't reproduce original crash. Based purely on the incomplete backtrace and code reading
      Set an Aurorae theme. Closed some windows. Things still worked as before
      Reviewers: #kwin, #plasma, mart
      Reviewed By: #kwin, #plasma, mart
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D13614
  19. 19 Jun, 2018 1 commit
  20. 18 Jun, 2018 3 commits
  21. 13 Jun, 2018 1 commit
  22. 11 Jun, 2018 1 commit
    • David Edmundson's avatar
      Set specific edge cursor shape when resizing · 5b4eb80c
      David Edmundson authored
      Instead of seeing the cursor <--> on the left edge you now see an icon
      that looks like |<-  .
      This brings kwin decorations in line with GTK CSD icons.
      In theory this is also useful to tell which window will resize in the
      case of side-by-side windows (regardless of whether borders are on or
      not). In practice with the adwaita icon theme I tested with it's not
      very intuitive to realise which is which till you learn the icon.
      Change is more involved than it should be as Qt::CursorShape doesn't
      have these entries, and I don't want to shadow that enum internally or
      to change kwin effect code.
      Specifics depend on cursor icon theme if they are not present it will
      fallback to the <--> icon. (Breeze does not have them currently)
      Test Plan:
      Resized some windows (on X and on Wayland)
      Correct icon appeared on Adwaita
      Existing icon appeared on Breeze
      Reviewers: #plasma
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D13396
  23. 07 Jun, 2018 2 commits
    • Vlad Zahorodnii's avatar
      [scenes/qpainter] Draw decoration shadows · 2d01ba64
      Vlad Zahorodnii authored
      QPainter doesn't render decoration shadows. It renders only
      shadows provided through ShadowInterface.
      With this change, painting of shadows is done in similar way OpenGL backend is
      currently doing.
      {F5734867, layout=center, size=full}
      {F5734870, layout=center, size=full}
      Depends on D10811 (dummy decoration with shadows in autotests)
      Test Plan:
      * start kwin with QPainter backend enabled:
      KWIN_COMPOSE=Q kwin_wayland --xwayland --windowed
      * open konsole and kate:
      DISPLAY=:1 konsole
      DISPLAY=:1 kate
      Reviewers: #kwin, graesslin, davidedmundson
      Reviewed By: davidedmundson
      Subscribers: abetts, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D10943
    • Vlad Zahorodnii's avatar
      [scenes/opengl] Fix overlapping shadow tiles · 7637cfc2
      Vlad Zahorodnii authored
      This problem appears if shadow corner tiles are too big and
      some window has size smaller than 2 * shadowTileSize.
      This change tries to address the problem above by exclusing
      overlapping tile parts. If there are any two overlapping corners
      then tile between them(top/right/bottom/left) is not rendered.
      Also, because some corner tile parts can be excluded, corner tiles
      are expected to be symmetrical(i.e. if we remove right half from
      the top-left tile and left half from the top-right tile and
      stick them together, they still look fine, there are no misalignments, etc).
      Most shadows(e.g. shadows from Breeze) have such behaviour.
      No tiles are overlapping
      {F5728514, layout=center, size=full}
      Overlapping tiles
      {F5728516, layout=center, size=full}
      And this is how it supposed to be
      {F5728517, layout=center, size=full}
      Test Plan:
      * apply D11069 to Breeze
      * in System Settings/Application Style/Window Decorations, choose "Very Large" shadow size
      * open Konsole
      * resize it to a minimum possible size
      Reviewers: #kwin, graesslin, davidedmundson
      Reviewed By: #kwin, davidedmundson
      Subscribers: davidedmundson, ngraham, anemeth, abetts, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D10811
  24. 05 Jun, 2018 1 commit