1. 19 Aug, 2017 3 commits
    • Martin Flöser's avatar
      Send QKeyEvent with Qt::Key as expected by Qt to internal windows · 70bc9524
      Martin Flöser authored
      Summary:
      KWin passes the current keysym converted to a Qt::Key in the QKeyEvent.
      The current keysym does not always change when a key gets released, so
      when pressing a shortcut the release carry a Qt::Key which could be
      considered as wrong.
      
      QtWayland transforms the actual pressed/released key into a keysym and
      passes that through the QKeyEvent. This change does the same for the
      internal windows. A new QKeyEvent is created and adjusted in a way that
      it matches what Qt expects.
      
      Why not change everything to how Qt expects it? The key is used at
      various places and in KWin internally we expect the behavior how it is
      currently implemented. So it's better to use Qt's expectation only when
      interacting with Qt.
      
      Also the change carries a workaround for a bug in QKeySequenceEdit
      (see QTBUG-62102) and transforms Super to Meta. As this adjustment only
      makes sense for the internal windows we need to send in an adjusted
      QKeyEvent anyway, so another argument for using the Qt behavior only in
      this place.
      
      Test Plan:
      Can set a shortcut on Wayland and it can be used to activate
      the window.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D6828
      70bc9524
    • Martin Flöser's avatar
      [platforms/x11] Use a GlxContextAttributeBuilder · f88c322a
      Martin Flöser authored
      Summary:
      Based on the work of 3f4995fb this change
      introduces a GlxContextAttributeBuilder to make the requesting of context
      attributes cleaner, more verbose and less error prone copy and paste.
      
      Test Plan:
      Switched between Core and legacy and verified the output;
      extended auto test
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D6411
      f88c322a
    • Martin Flöser's avatar
      Create a dedicated X11EventFilter for recognizing first user interaction · 36a31898
      Martin Flöser authored
      Summary:
      Workspace monitors the X11 events to detect when the user first
      interacts with the system. This is only required on X11 for activating
      the same client from previous session. So far this was spread over many
      parts in the long event switch statement. To make this more contained a
      dedicated event filter is introduced which also gets deleted again once
      the first user interaction got recognized.
      
      Test Plan: Compiles
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D7371
      36a31898
  2. 18 Aug, 2017 1 commit
    • David Edmundson's avatar
      Track outputs in kwin integration tests · 34de2c2b
      David Edmundson authored
      Summary:
      Split from the last review, as in order to track output's removed (in
      any way that's useful) the registry needs to be on the heap and the change grew.
      
      Test Plan:
      Every test that previously passed on my system still does
      Though currently that's not every test (for some reason) which was
      my main motivation for splitting.
      
      Reviewers: #plasma, graesslin
      
      Reviewed By: #plasma, graesslin
      
      Subscribers: plasma-devel, kwin, #kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D7377
      34de2c2b
  3. 16 Aug, 2017 5 commits
    • Martin Flöser's avatar
      Migrate Xkb::toQtKey away from KKeyServer · 5d101ce2
      Martin Flöser authored
      Summary:
      Turn Xkb into a QObject
      
      Reduced dependencies on other classes and allows to emit signal directly
      instead of emitting a signal on another class.
      
      Dependency inject KWayland::Server::SeatInterface into Xkb
      
      No need to depend on WaylandServer from within Xkb.
      
      [autotests] Add test case for Xkb::toQtKey
      
      Tests all key codes KKeyServer is able to map to Qt.
      
      Migrate Xkb::toQtKey away from KKeyServer
      
      The regression in kwindowsystem in
      32526718eae99ccb594360627586eebdf793372b showed once more that it's time
      to migrate the xkb keysym to Qt::Key mapping away from KKeyServer. The
      main problem with KKeyServer is that it's made for X11 and we don't have
      X11 here. This causes warnings printed at runtime and the code only
      works by accident at all because KKeyServer fails to initialise
      modifiers. That is normally KKeyServer would include the modifiers, but
      that is nothing we are interested in for mapping xkb keysyms to Qt::Key.
      
      So to address this, KWin now implements the mapping itself. It's based
      on the implementation in KKeyServer, but also improved by providing
      faster xkb to Qt conversion (which matters for KWin more than the other
      direction).
      
      Long term plan is to extend this so that also on X11 it can be used.
      Then it should be split out and be used in KKeyServer as a replacement
      for the current implementation which could support both X11 and Wayland.
      
      Test Plan:
      New test case added which covers all keysyms supported by
      existing KKeyserver mapping
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D7336
      5d101ce2
    • Martin Flöser's avatar
      [autotests] Add test case for Xkb::toQtKey · 801fe410
      Martin Flöser authored
      Tests all key codes KKeyServer is able to map to Qt.
      801fe410
    • Martin Flöser's avatar
      Dependency inject KWayland::Server::SeatInterface into Xkb · dbb951b4
      Martin Flöser authored
      No need to depend on WaylandServer from within Xkb.
      dbb951b4
    • Martin Flöser's avatar
      Turn Xkb into a QObject · 08ae17e2
      Martin Flöser authored
      Reduced dependencies on other classes and allows to emit signal directly
      instead of emitting a signal on another class.
      08ae17e2
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · fcfe48ea
      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"
      fcfe48ea
  4. 13 Aug, 2017 4 commits
  5. 12 Aug, 2017 4 commits
    • Martin Flöser's avatar
      Remove Keyboard modifiers from Qt::Key created in Xkb::toQtKey · d56b75f6
      Martin Flöser authored
      The KWindowSystem change 32526718eae99ccb594360627586eebdf793372b caused
      a regression in KWin as Qt::Enter on keypad is no longer enter, but enter
      with modifier mask. For all other modifiers it was never a problem that
      the KKeyServer method also returned modifiers as it could not read the
      X modifiers anyway.
      
      As KWin has full knowledge about the modifiers through Xkb it does not
      need the modifier mapped into the Qt::Key.
      
      This fixes the failing TestWindowSelection autotest which started to fail
      due to the change in KWindowSystem.
      d56b75f6
    • Martin Flöser's avatar
      Move event filtering for overlay window into an X11EventFilter · a65b2c06
      Martin Flöser authored
      Summary:
      The OverlayWindowX11 also inherits from X11EventFilter and performs
      the filtering itself.
      
      Test Plan: Compiles, not yet tested as I'm on Wayland
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D7197
      a65b2c06
    • Martin Flöser's avatar
      Move the X11 specific OverlayWindow into the platform/x11 · b4a79d30
      Martin Flöser authored
      Summary:
      The overlay window is only needed for the X11 based compositors. Given
      that it is better suited in the X11 platform. Unfortunately it is not
      possible to completely move it into the platform plugin as it is still
      referenced in KWin core (e.g. SceneXRender). Due to that the
      OverlayWindow in KWin core is turned into a pure virtual class with the
      implementation being moved into the plugin.
      
      The platform API gains a new virtual factory method which is only
      implemented in the X11 platform.
      
      Test Plan: Compiles
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D7193
      b4a79d30
    • Martin Flöser's avatar
      Implement the shortcut caption suffix for Wayland windows · bbca8c66
      Martin Flöser authored
      Summary:
      The generation of the shortcut caption part is moved from Client to
      AbstractClient. The ShellClient also has a captionSuffix and implements
      the full part in caption.
      
      Overall this needs more refactoring to support more sharing between the
      two implementations. But one step at a time.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D7093
      bbca8c66
  6. 10 Aug, 2017 1 commit
  7. 09 Aug, 2017 4 commits
  8. 08 Aug, 2017 2 commits
  9. 07 Aug, 2017 4 commits
  10. 02 Aug, 2017 3 commits
  11. 31 Jul, 2017 9 commits