1. 28 Oct, 2016 3 commits
  2. 26 Oct, 2016 1 commit
    • Martin Flöser's avatar
      Pass a desktopfile name to kcmshell5 · 0b0aae77
      Martin Flöser authored
      In order to have a proper window icon for kcmshell5 on Wayland KWin
      needs to pass a desktop file name as command line argument.
      The desktop file of kwinfocus is used as it uses the
      preferences-system-windows icon which is also the icon on X11.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3162
  3. 25 Oct, 2016 3 commits
    • Martin Flöser's avatar
      Call GLRenderTarget::setVirtualScreenGeometry prior to self test · f792c825
      Martin Flöser authored and Bhushan Shah's avatar Bhushan Shah committed
      The shader self test uses GLRenderTarget and restores the viewport. Due
      to the setVirtualScreenGeometry not being set the calculated viewport is
      incorrect and any rendering breaks. This is a regression introduced with
      1708278a which only affects Wayland
      backends which do not perform per screen rendering.
      The glxbackend was not affected as it sets the viewport on screen
      geometry change.
      Reviewers: bshah, #plasma_on_wayland, #kwin
      Reviewed By: bshah, #plasma_on_wayland, #kwin
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3155
    • Luca Beltrame's avatar
    • Antonio Larrosa Jimenez's avatar
      [platformx/x11] Add a freeze protection against OpenGL · 19147f5f
      Antonio Larrosa Jimenez authored
      With nouveau driver it can happen that KWin gets frozen when first trying
      to render with OpenGL. This results in a freeze of the complete desktop
      as the compositor is non functional.
      Our OpenGL breakage detection is only able to detect crashes, but not
      freezes. This change improves it by also added a freeze protection.
      In the PreInit stage a thread is started with a QTimer of 15 sec. If the
      timer fires, qFatal is triggered to terminate KWin. This can only happen
      if the creation of the OpenGL compositor takes longer than said 15 sec.
      In the PostInit stage the timer gets deleted and the thread stopeed
      Thus if a freeze is detected the OpenGL unsafe protection is written into
      the config. KWin aborts and gets restarted by DrKonqui. The new KWin
      instance will no longer try to activate the freezing OpenGL as the
      protection is set.
      If KWin doesn't freeze the protection is removed from the config as
      we are used to.
      Check for freezes for the first n frames, not just the first
      This patch changes the freeze detection code to detect freezes in the
      first 30 frames (by default, users can change that with the
      KWIN_MAX_FRAMES_TESTED environment variable). This detects
      successfully the freezes associated to nouveau drivers
      in https://bugzilla.suse.com/show_bug.cgi?id=1005323
      Reviewers: davidedmundson, #plasma, #kwin, graesslin
      Reviewed By: #plasma, #kwin, graesslin
      Subscribers: luebking, graesslin, kwin, plasma-devel, davidedmundson
      Tags: #plasma
      Differential Revision: https://phabricator.kde.org/D3132
  4. 24 Oct, 2016 2 commits
  5. 21 Oct, 2016 2 commits
  6. 20 Oct, 2016 3 commits
    • Martin Flöser's avatar
      Remove GLVertextBuffer::setVirtualScreenSize · ebe12c55
      Martin Flöser authored
      Marked for removal with next ABI break. Which happened with
    • Martin Flöser's avatar
      Implement cursor shape tracking on Wayland · 5b9da55e
      Martin Flöser authored
      So far the tracking for cursor shape was done incorrectly on Wayland by
      only listening to X11 cursor changes. That's from a time when
      KWin/Wayland was still run on top of an X server.
      Nowadays the Platform tracks cursor shape changes and emits changes to
      it. Xwayland cursor changes go through the normal Wayland way so it's
      just one way to get it on Wayland.
      This change adds the required connect and changes the signal signature
      in Cursor by dropping the serial argument. No user of the signal uses
      the argument and on Wayland we don't have a serial for the cursor. So it
      can be dropped.
      Test Plan: Zoom effect updates cursor shape correctly on Wayland
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3095
    • Martin Flöser's avatar
      Add a PlatformCursorImage to Platform and EffectsHandler · ea52ef9e
      Martin Flöser authored
      There are several effects (screenshot, zoom) which need access to the
      cursor image and cursor hotspot. So far these effects used X11
      unconditionally to get the cursor which obviously does not work on
      This change adds a new class PlatformCursorImage to kwinglobals which
      wraps what a cursor is (image and hotspot) and adds a new virtual method
      to Platform to provide such a PlatformCursorImage. By default it's the
      cursor image the Platform tracks. On X11/standalone platform this new
      virtual method is overriden and provides a PlatformCursorImage from X11
      using the code previously used in screenshot effect.
      Screenshot effect and zoom are adjusted to use the new API instead of
      Test Plan:
      Zoom effect tested on Wayland, now gets the proper cursor icon.
      X11 functionality not yet tested.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3093
  7. 18 Oct, 2016 6 commits
  8. 17 Oct, 2016 13 commits
    • Martin Flöser's avatar
      Merge branch 'Plasma/5.8' · 3e8bd70f
      Martin Flöser authored
    • Martin Flöser's avatar
      Properly specify libdrm dependency · f642eb9d
      Martin Flöser authored
      KWin needs at least 2.4.62 which added the atomic requests.
    • Martin Flöser's avatar
      [effects] Make screenshot effect work with multiple output rendering · eadfcb3d
      Martin Flöser authored
      Adjusts the screenshot effect to mutliple output rendering. In that case
      the blit from framebuffer can only get one output. Thus the effect needs
      to blit every output and combine the rendering result.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3059
    • Martin Flöser's avatar
      Pass the current output geometry to ScreenPaintData · 359224a5
      Martin Flöser authored
      On Wayland per output rendering is performed and paintScreen is invoked
      for every output. Some effects need the information which output is
      currently being rendered as otherwise e.g. FBO access could fail.
      This change adds the current output geometry to ScreenPaintData. On X11
      (all outputs one geometry) this information is not set and a null rect
      is returned. That way the effects can also easily check which rendering
      mode is used.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3058
    • Martin Flöser's avatar
      Fix glBlitFramebuffer for per-output rendering · 4e9a1eeb
      Martin Flöser authored
      This is similar to ff6e042c just for
      GLRenderTarget instead of GLVertexBuffer. The reasoning is the same: on
      Wayland KWin has one native window per screen and needs to adjust the
      blit target depending on the area.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3056
    • Martin Flöser's avatar
      Use new PlasmaWindowInterface::setIcon · 05d21b6b
      Martin Flöser authored
      Summary: This allows to pass also Xwayland icons to the task manager.
      Reviewers: #kwin, #plasma_on_wayland, hein
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3050
    • Martin Flöser's avatar
      Support custom color scheme for Wayland windows · f41b6106
      Martin Flöser authored
      On Wayland the QtExtendedSurface is used to pass the path to the color
      scheme using the generic window property. To support this ShellClient
      installs an event filter on the extended surface and listens for dynamic
      property change events.
      As the color scheme is KDE specific anyway it is not a problem that a Qt
      specific interface is being used. For other toolkits just passing the
      name to KDE's color scheme isn't sufficient anyway. If at some point we
      find a way to support this for e.g. GTK+ we would need to come up with a
      dedicated interface.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3047
    • Martin Flöser's avatar
      Set icon to wayland if desktop file is not found · 8201def9
      Martin Flöser authored
      For X windows KWin uses the generic X icon if no icon is found. Thus
      KWin should use the generic Wayland icon if no icon is found for a
      Wayland client.
      With this change applications with incorrect desktop file name at least
      get a generic icon instead of no icon.
      Test Plan: Started Qt assistant on Wayland and it had icon.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3023
    • Martin Flöser's avatar
      Merge branch 'Plasma/5.8' · 9eede1c6
      Martin Flöser authored
    • Martin Flöser's avatar
      [tabbox] Intercept QWheelEvents on QQuickWindow for scrolling · e9d20b80
      Martin Flöser authored
      The TabBox performs the scrolling of the items by itself in order to
      support wheel events even if the mouse is not on the TabBox. For that
      KWin grabs pointer events on X11 (on Wayland an input filter is used)
      and forwards them to the TabBox.
      Qt uses Xinput2 for scrolling on the QQuickWindow. Due to that KWin
      does not get any xcb core button press/release events when scrolling
      inside the QQuickWindow and thus scrolling doesn't work.
      There are three possible approaches to fix this:
      1. Implement scrolling support in each of the QML switchers
      2. Add an xinput2 filter to TabBox
      3. Intercept the QWheelEvents on the QQuickWindow
      The first approach has the disadvantage that all themes need
      adjustment and that there might be behaviorial difference whether one
      scrolls on the TabBox window or outside the window.
      The second approach would be most in line with the other filters, but
      is difficult due to the nature of xinput2 (no xcb bindings, etc).
      Thus the third approach might be the best solution. Wheel events are
      only delivered to the QQuickWindow if the native events were not already
      intercepted, thus we know it won't have side effects for the case that
      Wayland is used or xinput2 is not supported.
      The implementation installs an event filter on the QQuickWindow which
      gets created when showing the TabBox and inside the filter waits till
      there is an angleDelta of +/-120 and scrolls by one per every 120 angle
      delta as described in the QWheelEvent documentation.
      BUG: 369661
      FIXED-IN: 5.8.2
      Test Plan: Scrolled with touchpad and mouse wheel.
      Reviewers: #kwin, #plasma, broulik
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D2953
    • Martin Flöser's avatar
      Fix shortcut triggering with shift+letter · 78a2732a
      Martin Flöser authored
      A shortcut with e.g. shift+w could not be triggered as shift is
      considered as consumed. It transforms the keysym to an uppercase variant
      thus it is consumed.
      This change checks for the condition that shift is pressed and is the
      only consumed modifier. If the current keysym is a letter the shift is
      removed from the consumed modifier again to still support the shortcut.
      BUG: 370341
      FIXED-IN: 5.8.2
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3015
    • Martin Flöser's avatar
      [kwinrules] Hide all autogroup related widgets · db95b968
      Martin Flöser authored
      Window tabs which are required for autogroup are currently not supported
      in KWin. Thus exposing autogroup related window rules does not make any
      This change hides the options again in the hope that we can bring the
      feature back in future.
      BUG: 370301
      FIXED-IN: 5.8.2
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D2996
    • Martin Flöser's avatar
      Support LEDs in Xkb and libinput · 4c7752c9
      Martin Flöser authored
      The Xkb implementation starts to track the state of the LEDs in the
      keymap and emits a signal whenever the LEDs change. This signal is
      connected to a method in LibInput::Connection which updates the led
      state on all devices and uses it to init the state of the led when a new
      device gets connected.
      BUG: 369214
      FIXED-IN: 5.8.2
      Test Plan: Connected a keyboard with LEDs and enabled NumLock and ScrollLock.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2943
  9. 14 Oct, 2016 1 commit
    • Martin Flöser's avatar
      [effects] Delay taking screenshot into next rendering cycle · e9b25f17
      Martin Flöser authored
      For windows the screenshot effect already delayed the rendering into the
      next cycle. But for the fullscreen variants which save to a file the
      Screenshot effect did try to take the shot directly.
      This can be problematic as e.g. the OpenGL context might not be bound at
      all. Also this makes it impossible to screenshot multiple screens
      together in the Wayland case.
      This change delays the DBus replies, schedules the geometry and takes
      the screenshot in the next rendering pass. It does not fix the
      multiscreen wayland problem yet.
      Reviewers: #kwin
      Subscribers: kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D3052
  10. 13 Oct, 2016 1 commit
  11. 12 Oct, 2016 1 commit
    • Martin Flöser's avatar
      Support for relative pointer motion events · cc2f4e32
      Martin Flöser authored
      If KWin interacts with Libinput the RelativePointerManager interface
      gets created on the Wayland server. The ForwardInputEventFilter does
      forward the relative motion events in addition to the normal motion
      In order to properly support the relative motion events as they are
      expected by the Wayland protocol the handling of pointer motion events
      got slightly adjusted:
      * Libinput Pointer event extended by the additional data points
      * Libinput Pointer event carries the delta as a QSizeF instead of
      * PointerInputRedirection adjusted to take a pointer motion event with
      more arguments
      * Custom QMouseEvent subclass adjusted to carry the additional members
      The DebugConsole is adjusted to show the relative motion events in
      addition to the global position.
      Test Plan:
      Verified the manager object is created and verified the
      events in DebugConsole. Unfortunately not aware of any test application.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D2979
  12. 11 Oct, 2016 3 commits
  13. 10 Oct, 2016 1 commit