1. 15 Dec, 2016 2 commits
  2. 13 Dec, 2016 2 commits
  3. 09 Dec, 2016 1 commit
  4. 08 Dec, 2016 2 commits
    • Martin Flöser's avatar
      Implement support for pointer constraints · 0c5ca405
      Martin Flöser authored
      Summary:
      There are two types of constraints supported:
      1. Pointer confinement
      2. Pointer locking
      
      In the case of confinement the pointer is confined to a given region of
      the surface. This is comparable to general operation where the pointer
      is confined to the screen region.
      
      In the second case the pointer gets locked. That means it cannot move at
      all. No further position updates are provided, only relative motion
      events can go to the application. There is a hint about cursor position
      update on unlock which is not yet implemented in KWayland::Server, thus
      also not in this change.
      
      The implementation in KWin grants the requests for pointer constraints
      when the pointer enters the constrained region, either by pointer
      movement or by e.g. stacking order changes. There is no confirmation
      from user required to enter that mode. But we want to show an OSD when
      the pointer gets constrained, this is not yet implemented, though.
      
      Breaking an active constraint is relatively easy. E.g. changing the
      stacking order will break the constraint if another surface is under the
      cursor. Also (in case of confinement) moving the pointer to an
      overlapping window breaks the confinement. But as soon as one moves the
      pointer back to the window a constraint might get honoured again.
      
      To properly break there is a dedicated event filter. It listens for a
      long press of the Escape key. If hold for 3sec the pointer constraint is
      broken and not activated again till the pointer got moved out of the
      window. Afterward when moving in the pointer might activate again.
      
      The escape filter ensures that the key press is forwarded to the
      application if it's a short press or if another key gets pressed during
      the three seconds. If the three seconds way fires, the later escape
      release is not sent to the application.
      
      This basic interaction is also ensured through an added auto test.
      
      This change implements T4605.
      
      Test Plan: Added auto test and nested KWin Wayland with D3488
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D3506
      0c5ca405
    • Martin Flöser's avatar
      [platforms/wayland] Use a ConfinedPointer if available · 2defd6bb
      Martin Flöser authored
      Summary:
      This supports "grabbing" the pointer on right ctrl key just like on X11.
      If the Wayland server supports pointer constraints protocol, the nested
      Wayland compositor creates a confined pointer if the right ctrl key is
      pressed.
      
      On another right ctrl press the (active) constraint gets removed again.
      
      To indicate the current state the window title gets updated. This also
      implements window title support for the first time.
      
      This change implement T4604.
      
      Test Plan: Tested with a modified KWin with server-side pointer constraints support
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D3488
      2defd6bb
  5. 06 Dec, 2016 2 commits
    • Roman Gilg's avatar
      [libinput] Minor coding style fix · 50bda95f
      Roman Gilg authored
      50bda95f
    • Roman Gilg's avatar
      [libinput] Change unset of scroll method and acceleration profile · fd07b1dc
      Roman Gilg authored
      Go for a more intuitive unset behaviour of scroll method and acceleration
      profile properties.
      
      Summary:
      Unsetting a scroll method should only work, if the scroll method is currently
      active. For example when scroll-two-finger is active (i.e. scroll-edge,
      scroll-on-button-down is not active):
      * unsetting scroll-two-finger should deactivate it and activate no-scroll
      * but unsetting for example scroll-edge should _not_ deactivate scroll-two-
        finger and _not_ activate no-scroll
      
      Reworked setting scroll method auto test in order to test it.
      
      Regarding acceleration profiles: Unsetting one, should always switch to the
      other possible one as long as both are supported. In this case
      LIBINPUT_CONFIG_ACCEL_PROFILE_NONE is not a valid option in contrast to the
      definition of the scroll method enums.
      
      Reviewers: #kwin
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3590
      fd07b1dc
  6. 05 Dec, 2016 1 commit
  7. 02 Dec, 2016 2 commits
    • Roman Gilg's avatar
      [libinput] Add more support for pointer devices, in particular touchpads · 7f16d83e
      Roman Gilg authored
      This patch is made in preparation for the Touchpad KCM for Wayland.
      
      Summary:
      * KWin has a Libinput version requirement bump to 1.5
      * new isTouchpad property to distinguish touchpads from mice
      * new lmrTapButtonMap property
      * new disableWhileTyping property
      * new pointerAccelerationProfile property
      * new defaultPointerAcceleration property
      * save to config mechanism added for new propertys and pointerAcceleration
      * new D-Bus interface org.kde.KWin.InputDeviceManager and method devicesSysNames
      * removed unnecessary additional D-Bus service name org.kde.KWin.InputDevice
      * changing acceleration in the Mouse KCM doesn't influence touchpads anymore
      
      Reviewers: #kwin, #plasma, davidedmundson
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3479
      7f16d83e
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · c1e88d0a
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      c1e88d0a
  8. 30 Nov, 2016 1 commit
  9. 29 Nov, 2016 2 commits
    • Martin Flöser's avatar
      Implement borderlessMaximizedWindows for Wayland windows · f32e6550
      Martin Flöser authored
      Summary:
      Maximize code was not yet adjusted to support decorations. Code is as
      much as possible similar to the X11 Client implementation.
      
      BUG: 370982
      
      Test Plan: Added auto test and run a nested KWin/Wayland with the setting enabled
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D3508
      f32e6550
    • Martin Flöser's avatar
      Properly implement maximize of ShellClient · 9934f5b5
      Martin Flöser authored
      Summary:
      This brings some more checks from Client to ShellClient. Thus the
      states are better adjusted.
      
      Unfortunately the X11 implementation is also slightly adjusted, so could
      create regressions in worst case.
      
      BUG: 368393
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D3507
      9934f5b5
  10. 28 Nov, 2016 3 commits
  11. 25 Nov, 2016 10 commits
    • David Edmundson's avatar
      Don't register a new service for screenshots · aae24bb0
      David Edmundson authored
      Summary:
      If you're going to have kwin in the service name anyway there's
      absolutely no benefit to having clients not use the existing
      org.kde.KWin.
      
      Test Plan: Object is still registered.
      
      Reviewers: #plasma, graesslin
      
      Reviewed By: #plasma, graesslin
      
      Subscribers: graesslin, plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3357
      aae24bb0
    • David Edmundson's avatar
      Initialise all variables for WindowVertex. · adbd9fc5
      David Edmundson authored
      Summary:
      The default constructor shouldn't have been used anyway, but better safe
      than sorry.
      
      Reviewers: #plasma, graesslin
      
      Reviewed By: #plasma, graesslin
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3453
      adbd9fc5
    • Martin Flöser's avatar
      [effects] Add a colorpicker effect · 2cc55e40
      Martin Flöser authored
      Summary:
      The effect exports itself to DBus as object "/ColorPicker" and provides
      an own interface "org.kde.kwin.ColorPicker".
      
      It has one exported method to DBus "pick" which returns a QColor. When
      invoked an interactive position picking selection is started. If it ends
      the effect reads the color value at the picked position from the OpenGL
      color buffer.
      
      This implements T4568.
      
      Reviewers: #kwin, #plasma_on_wayland, broulik
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D3480
      2cc55e40
    • Martin Flöser's avatar
      [effects] Cleanup screenshot effect · b42eb9a3
      Martin Flöser authored
      Summary:
      This change cleans up the screenshot effect a little bit.
      * better check whether a screenshot is already being taken
      * proper DBus error messages
      * less duplication of error message strings
      * don't keep the QDBusConnection around
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3493
      b42eb9a3
    • Martin Flöser's avatar
      [autotests] Wait longer in LockScreenTest · ce7a9476
      Martin Flöser authored
      It timed out on build.kde.org, so let's try to wait longer.
      ce7a9476
    • Martin Flöser's avatar
      Add interactive position selection to screenshot screen under cursor · f9f7b84c
      Martin Flöser authored
      Summary:
      A second interactive selection mode gets added to select a position on
      the screen. This is handled by the same input event filter as for the
      window selection. Just that instead of returning a window, it returns a
      QPoint.
      
      This allows to pick a point on the screen which we need to screenshot
      the screen under the mouse cursor and in future for color picking.
      
      The screenshot effect provides two new dbus methods to (interactively)
      select a screen or fullscreen. This allows spectacle to screenshot the
      (full) screen with still having the user in control.
      
      Reviewers: #kwin, #plasma_on_wayland, bgupta
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D3475
      f9f7b84c
    • Martin Flöser's avatar
      Ignore non-relevant modifiers when evaluating mouse actions · 0b47b848
      Martin Flöser authored
      Summary:
      E.g. CapsLock should not prevent Alt+left click move.
      
      BUG: 372809
      
      Reviewers: #kwin, #plasma_on_wayland, broulik
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D3467
      0b47b848
    • Martin Flöser's avatar
      Port Compositor::windowRepaintsPending to use std::any_of · ec2d862d
      Martin Flöser authored
      Summary:
      While investigating a repaint issue I had a hard time to work with the
      code and decided to change it to a more modern variant.
      
      Instead of duplicating the same logic for each of the lists it's now
      moved into a dedicated templated method which used std::any_of. Which is
      exactly the algorithm we need: if there is any window with a non empty
      repaints region it should return true.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3397
      ec2d862d
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 47a7f24e
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      47a7f24e
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 966775d6
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      966775d6
  12. 23 Nov, 2016 1 commit
    • Hrvoje Senjan's avatar
      Compile++ · 6195ab26
      Hrvoje Senjan authored
      With older gcc at least there is a forward declaration error w/o explicit include.
      
      BUG: 372821
      Revewed-by: Martin Gräßlin
      6195ab26
  13. 22 Nov, 2016 10 commits
    • Roman Gilg's avatar
      [libinput] Rework device config writing and save enum of ScrollMode as integer · 87150816
      Roman Gilg authored
      This is a larger patch rewriting some parts of the config saving functionality
      in device.cpp in order to:
      
      1. Make it possible to save ScrollMode as integer instead of using three booleans
      2. Simplify the addition of new keys or types in the future
      
      Changes in detail:
      a) Adds new ConfigKey ScrollMethod and removed now unnecessary keys per method
      b) Adds constructors to the ConfigData struct. This allows to create ConfigData
         entries for s_configData without the need of stating empty brackets and the
         useage of default values.
      c) Use plain member function pointers instead of std::function, in order to
         compactify code and have better compile output in case something goes wrong.
      c) Cleans up ScrollMethod functions and adds interface methods for transforming
         the saved integer into type enum libinput_config_scroll_method.
      d) Adjusts auto test for loading the ScrollMethod value from the config file.
      
      Reviewers: #kwin, graesslin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3460
      87150816
    • Roman Gilg's avatar
      [libinput] Query defaultLeftHanded, save leftHanded, fix ScrollMode config · ad064768
      Roman Gilg authored
      Some small improvements / fixes to the libinput backend:
      - Query libinput_device_config_left_handed_get_default
      - Write leftHanded property to config file
      - When saving the touchpad scroll mode, write false to all other ones.
        Otherwise it will always enable the last read entry after reboot.
      - Use macro for setLeftHanded(bool) and setNaturalScroll(bool)
      
      Reviewers: #kwin, graesslin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3430
      ad064768
    • Martin Flöser's avatar
      Move linking to DL_LIBRARY to x11standalone platform · 0dc500fe
      Martin Flöser authored
      Summary:
      It's only needed by the GLX backend, so only find if we have GLX at all
      and only link where needed. As it was handled incorrectly before, it's
      now using proper ifdef.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3448
      0dc500fe
    • Martin Flöser's avatar
      Remove epoxy/egl.h from kwinglutils_func.h · 42456bdf
      Martin Flöser authored
      Summary:
      It's not needed inside libkwinglutils. The only required usage is from
      abstract_egl_backend.h where the include is moved to.
      
      This removes an fixx11h.h from a kwin lib.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3447
      42456bdf
    • Jonathan Riddell's avatar
      Update version number for 5.8.4 · 09dfba42
      Jonathan Riddell authored
      GIT_SILENT
      09dfba42
    • Martin Flöser's avatar
      Remove useless branching on EGL/GLX in GLPlatform · b1e258d1
      Martin Flöser authored
      Summary:
      The code for EGL and GLX platform did the same checks, just with the
      difference that the EGL check has another check for isGLES.
      
      So let's just do the branching on whether isGLES or GL.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3446
      b1e258d1
    • Martin Flöser's avatar
      [effects] Handle windowShown and windowHidden in fade effect · 451bbb54
      Martin Flöser authored
      Summary:
      For Wayland windows we can have a sequence of window unmapped
      (windowHidden signal) followed by a windowClosed way later when the
      application quits. This is for example the case with menus.
      
      The result of this was that the fade out animation triggered when the
      application quit showing all the already closed menus again.
      
      This change implements a windowShown and windowHidden handler and
      triggers the fadeIn/Out animation on it. If the window gets shown
      again the existing fadeOut animation gets cancelled, so that it can run
      again.
      
      If a window gets closed for which a fade out animation has been run
      already, it's not triggered again, thus ensuring that we don't see
      zombie windows.
      
      CCBUG: 372622
      
      Reviewers: #kwin, #plasma_on_wayland, hein
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D3419
      451bbb54
    • Martin Flöser's avatar
      [effects] Add a screenshot dbus method which takes a file descriptor · fbab2049
      Martin Flöser authored
      Summary:
      The idea behind this mode is to support applications like spectacle
      (see T4458). The calling application passes a file descriptor (created
      through e.g. a pipe) and the screenshot effect writes the captured image
      into that fd.
      
      The advantage over the existing variant which writes to a file in the
      /tmp directory is that this is peer-to-peer between the requesting
      application and KWin. No other application can get to that image.
      
      The change also includes setting SIGPIPE to ignore. It showed that when
      the reading side already cancelled the read prior to KWin writing out
      the image we get a SIGPIPE which results in application termination,
      which is not what we want in case of a Wayland compositor. The sigpipe
      can be ignored as Qt (and libpng) handles that error just fine at
      runtime.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D3412
      fbab2049
    • Martin Flöser's avatar
      [effects] Show info message in interactive window screenshot mode · cfdc1acb
      Martin Flöser authored
      Summary:
      While taking an interactive screenshot we should inform the user about
      what's going on, how to take the screenshot and how to cancel it.
      
      For this the effect creates an EffectFrame with the required
      information.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3403
      cfdc1acb
    • Martin Flöser's avatar
      Drop OpenGL based color correction from KWin · 17e0bad9
      Martin Flöser authored
      Summary:
      The feature has always been considered experimental. Unfortunately it is
      completely unmaintained and hasn't seen any commits in years. It
      requires kolor-manager to function, but that has not seen a release
      based on frameworks yet. This makes it difficult to maintain. In fact I
      have never been able from the introduction till now to setup a color
      corrected system. One needs kolor-manager and oyranos and especially the
      latter is hardly available on any linux distribution (e.g. not on the
      Debian/Ubuntu systems).
      
      Due to being unmaintained color correction in KWin did not keep up with
      recent changes. Neither did it see any updates during the xlib->xcb
      port, nor during the Wayland port. Especially the Wayland port with the
      rendering changes make it unlikely to function correctly. E.g. Wayland
      introduced a proper per-screen rendering, while color correction did a
      "fake" per screen rendering. How that is going to work in combination is
      something nobody ever tried. Now after the introduction of proper
      per-screen rendering the solution would be to port color correction to
      the new api, but that never happened.
      
      Color correction also modified the shaders, but a newer shader API got
      introduced some time ago. Whether the color correction shader support
      that or not, is unknown to me. Also which shader language versions are
      supported. I know it was based on 3d texture support, which back on
      introduction was partially lacking in OpenGL ES. Nowadays that changed,
      but color correction didn't update.
      
      Last but not least it is completely X11 based and there is no work on
      how to make it work with Wayland.
      
      Given all the problems, especially the fact that it is unmaintained and
      cannot be setup on my system, means to me that the only solution is to
      remove it.
      
      I'm open to having it reintroduced in future, but only if the
      availability on Linux distributions gets addressed before. As long as
      major linux distributions do not ship this feature, it should not be in
      KWin. Given that I must say that it was a mistake to add it in the first
      place and I need to point out that I was against the merge back then.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D3402
      17e0bad9
  14. 18 Nov, 2016 1 commit