1. 12 Sep, 2016 4 commits
  2. 09 Sep, 2016 1 commit
    • Martin Flöser's avatar
      Remove non visible internal windows from the x stacking order · 8d4204ac
      Martin Flöser authored
      Summary:
      KWin always has a few internal windows around which are not visible.
      A QWindow created somewhere, but not shown. Such windows should not
      be part of the stacking order.
      
      If they are it breaks code which looks at the top most window in the
      stacking order like e.g. SlidebackEffect.
      
      This change ensures that the stacking order gets updated whenever a
      ShellClient gets hidden and that internal windows with isShown being
      false are excluded from the stacking order.
      
      BUG: 364483
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2636
      8d4204ac
  3. 08 Sep, 2016 3 commits
  4. 07 Sep, 2016 1 commit
  5. 06 Sep, 2016 1 commit
  6. 05 Sep, 2016 1 commit
  7. 01 Sep, 2016 1 commit
  8. 31 Aug, 2016 2 commits
    • Martin Flöser's avatar
      Set the restore geometry after placing a ShellClient for the first time · d3741bd5
      Martin Flöser authored
      Summary:
      The restore geometry gets initially set to 0/0xsize before the placement
      is done. When going into updateClientArea and then afterwards into
      AbstractClient::checkWorkspacePosition the geometry restory is used for
      calculating the new position. This results in windows getting moved to
      0/0 when e.g. plugging in a new screen or a panel changes, etc.
      
      This change ensures that the restore geometry is set correctly after the
      first placement.
      
      BUG: 366696
      
      Reviewers: #kwin, #plasma_on_wayland, bshah
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2627
      d3741bd5
    • Roman Gilg's avatar
      Atomic Mode Setting / Universal Plane preliminary support · 997cf97c
      Roman Gilg authored
      This is Milestone 1 of full support of Atomic Mode Setting (AMS) and
      Universal Planes in the KWin DRM backend.
      
      With Milestone 1 we can use the primary plane of a DRM output and do an
      AMS commit (this means mode setting aswell as page flipping), if the
      driver supports it. Until now the functionality is only tested on Intel
      graphics. You need the drm-next kernel for most recent DRM kernel
      developments. As boot option set "i915.nuclear_pageflip". Additionally
      at the moment AMS is still hidden behind the environment variable
      KWIN_DRM_AMS. Set it, if you want to try out AMS.
      
      What needs to be done next: Make it possible to transfer EGL buffers
      directly to planes and implement logic for deciding about using a plane
      or not for a specific buffer.
      
      You can read more about it on LWN:
      https://lwn.net/Articles/653071
      And on Martin's blog:
      https://blog.martin-graesslin.com/blog/2015/08/layered-compositing/
      I used as model previous work by Daniel Stone for Weston:
      https://git.collabora.com/cgit/user/daniels/weston.git
      
      Reviewed-by: mgraesslin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2370
      997cf97c
  9. 30 Aug, 2016 4 commits
    • Martin Flöser's avatar
      Add a Workspace::findToplevel(QWindow*) method · 4c0e33a9
      Martin Flöser authored
      This allows finding the Toplevel for a QWindow which is on Wayland a
      ShellClient and on X11 an Unmanaged. This can be used to simplify
      code when a Toplevel is needed for an internal QWindow without having
      to do platform specific checks.
      4c0e33a9
    • David Edmundson's avatar
      authorizeKAction -> authorizeAction · 8db4a6ff
      David Edmundson authored
      8db4a6ff
    • Martin Flöser's avatar
      [autotests] Extend PlasmaSurface to verify position of OSD windows · f99a456f
      Martin Flöser authored
      This adds a new test case which maps an OSD window and verifies that it's
      positioned correctly. Then an additional screen is added which should not
      affect the position, but as the test case shows: it does affect the
      position.
      
      CCBUG: 366696
      f99a456f
    • Martin Flöser's avatar
      Support compose key in xkbcommon integration · a98a1b13
      Martin Flöser authored
      Summary:
      The Xkb class now creates a compose key table and a state object and
      feeds all key presses through the compose state machine.
      
      Xkb now tracks the latest keysym which is provided through new method
      currentKeysym. This is now used when creating a QKeyEvent instead of
      passing the key code to the xkb state. With that the keysym can also
      be updated through the compose state system.
      
      This only affects KWin internal usage where text is composed, e.g. the
      present windows effect filter. Wayland clients do not gain compose key
      support, though.
      
      Minimum xkbcommon version raised to 0.5 as compose key support is new
      in that version.
      
      Test Plan: Enabled compose key support in keymap and verified through DebugConsole
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2622
      a98a1b13
  10. 29 Aug, 2016 4 commits
  11. 28 Aug, 2016 1 commit
  12. 26 Aug, 2016 4 commits
    • Martin Flöser's avatar
      Move registerMetaType for SurfaceInterface* to main.cpp · 1c1dca6d
      Martin Flöser authored
      Toplevel has the SurfaceInterface* exposed as a property which results
      in a (incorrect) runtime warning on X11 about not registered meta type.
      1c1dca6d
    • Martin Flöser's avatar
      Register metatype for KWin::EffectWindow* · 440cca91
      Martin Flöser authored
      It's used as arg in a QMetaObject::invokeMethod and there was a report
      about KWin printing a warning of unregistered metatype.
      440cca91
    • Martin Flöser's avatar
      DiscardWindowPixmap when Surface size changes · be79d1ae
      Martin Flöser authored
      Summary:
      So far this connect was only in ShellClient, but it's needed for all
      Toplevels. Also when a XWayland window has it's surface size changed,
      the pixmap needs to be discarded. Otherwise KWin might hit an assert
      in AbstractEGLTexture due to the buffer having a different size than
      the texture had previously.
      
      Test Plan:
      Firefox, click download on bugreports.qt.io used to trigger
      this for me. With this change no longer able to reproduce.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2583
      be79d1ae
    • Martin Flöser's avatar
      [plugins/qpa] Call makeCurrent on the QOpenGLContext instead of the one in the platform context · 8909f878
      Martin Flöser authored
      Summary:
      SharingPlatformContext::swapBuffers needs to make the context current.
      For this is calls makeCurrent. Later on this tries to bind a fbo, which
      checks calls into the current QOpenGLContext. As we called makeCurrent on
      our own platform context Qt doesn't know that the context is current and
      returns in the worst case a nullptr and crashes.
      
      This change calls makeCurrent on the QOpenGLContext so that Qt also knows
      that this context is current now. The QOpenGLContext calls makeCurrent on
      the platform context, so what our code tried to do is still being done.
      
      In addition the method context() in AbstractPlatformContext is renamed to
      eglContext to no longer shadow the method in QPlatformContext.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2582
      8909f878
  13. 25 Aug, 2016 2 commits
    • Martin Flöser's avatar
      [autotests/integration] Add test case for rule matching on window role · 6e8a8913
      Martin Flöser authored
      New test infrastructure which supports testing window rules at runtime.
      Test exposes problem of window rules not able to match window roles in
      a case insensitive manner.
      
      CCBUG: 367554
      6e8a8913
    • Martin Flöser's avatar
      Forward x11 raw pointer buttons to PointerInputRedirection · 9c5f972c
      Martin Flöser authored
      Summary:
      The raw pointer button events intercepted in the XInput2 input filter
      get sent through the Platform to the PointerInputRedirection. This
      makes the PointerInputRedirection track the pointer button state and
      emit the signals for button changed and axis changed.
      
      These signals are used by the modifier-only shortcut detection to
      determine whether the shortcut should trigger.
      
      On X11 the "normal" input handling doesn't use the InputRedirection
      and the emitted signals are not consumed by anything else. As
      PointerInputRedirection is not inited the events are not forwarded
      to the input filter, thus won't be processed by other parts and
      won't interfere with the normal event processing on X11.
      
      Given that it also doesn't matter that the input filter does not
      apply the left-handed setting. The internal tracking will have a
      wrong mouse button, but nothing is going to do decisions based on
      the value of the pressed mouse button. For the moment all we are
      interested in is that a button is pressed.
      
      Test Plan:
      Pressed meta, clicked, scrolled, released meta: launcher
      did not open. Pressed meta, released meta: launcher opened
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2506
      
      BUG: 367730
      9c5f972c
  14. 24 Aug, 2016 6 commits
    • Martin Flöser's avatar
      [effects] Add enum value for new TouchPoints effect · b78848ef
      Martin Flöser authored
      BUG: 367727
      b78848ef
    • Martin Flöser's avatar
    • Martin Flöser's avatar
      Warp the xcb pointer whenever pointer leaves an X11 surface · 2feea783
      Martin Flöser authored
      Summary:
      For Xwayland windows we observed that passing pointer focus to another
      window does not trigger proper leave events on X. Which results in e.g.
      tooltip windows to show after the pointer moved to a completely
      different position on a completely different surface.
      
      This is a bug in Xwayland which will be fixed in 1.19 (already fixed in
      master). Given that there is a runtime version check. Although it's fixed
      in Xwayland master it's worth to carry a workaround.
      
      To circumvent this problem KWin warps the xcb pointer to 0/0 whever an
      X window loses pointer focus. That way the X window gets a proper leave
      through the X protocol.
      
      This created a problem though: when giving focus back to the X window it
      started to warp the pointer for maximized windows as KWin got pointer
      motion events through the X11 event filter for positions on the window
      decoration. These are passed into the screen edge filter which pushes
      the pointer back and warps our Wayland pointer. To solve this problem
      KWin no longer performs any actions for pointer motion in the X11 event
      filter if not on X11. The event filter needs to be reworked and most of
      it should be moved into the Platform API, if possible.
      
      Test Plan:
      Reproduced situations where one could see that pointer updates
      don't trigger leave. E.g. going from a highlighted window to the decoration.
      
      Reviewers: #kwin, #plasma_on_wayland, bshah
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2531
      2feea783
    • Martin Flöser's avatar
      Move implementation of iconGeometry from ShellClient to AbstractClient · 455c5c07
      Martin Flöser authored
      Summary:
      This allows Client to use the Wayland-specific implementation if there
      is no icon geometry set through the X11 way. That way Xwayland windows
      have an icon geometry even if Plasma is using Wayland and setting the
      icon geometry in the Wayland way. Which is expected as Plasma is
      ignorant about the windowing system a PlasmaWindow uses.
      
      In order to move the code from ShellClient to AbstractClient
      WaylandServer gained a new findAbstractClient(Surface*) method which
      is just like findClient(Surface*) with the difference that it returns
      an AbstractClient instead of a ShellClient*.
      
      Test Plan:
      minimized/unminimized an X client on Wayland, verified
      animation is correct (though broken in general for minimize)
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2530
      455c5c07
    • Martin Flöser's avatar
      [effects] Drop the logout effect · af80a546
      Martin Flöser authored
      Summary:
      The new logout design doesn't want to have the vignetting. Thus the
      logout effect itself doesn't make any sense any more. All that would
      still be used is the logout blur which can also be provided by the
      blur effect nowadays for fullscreen windows. As the new logout is a
      fullscreen window it should use that one.
      
      The logout effect did one more thing: it kept the vignetting and the
      blur once the user selected logout. Now without the vignetting this
      would be weird and again doesn't make much sense any more.
      
      So overall I think it's better to just drop the logout effect and use
      blur effect in normal way. Neat side advantage: it will also work on
      Wayland out-of-the-box.
      
      Reviewers: #kwin, #plasma, #vdg
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2553
      af80a546
    • Martin Flöser's avatar
      2a41229e
  15. 23 Aug, 2016 5 commits