1. 14 Nov, 2018 2 commits
    • David Edmundson's avatar
      [wayland] add enter/leave virtual desktop API · f521d4bb
      David Edmundson authored
      Summary:
      As setDesktop was changed to "move" this left unSetDesktop non-symetric.
      
      This replaces it with explicit API to enter/leave.
      
      This also moves new API to the new object based API rather than still
      using ints.
      
      Where numbers are used it has been tidied up so that desktop IDs are
      uint, which should be used when we have a list of desktops.
      int is used only when we have either a desktop ID or NET::OnAllDesktops
      (-1)
      
      Effects API cleared up to use this and use a set of x11 IDs, which
      avoids any potential complications of handling add and removes any
      ambiguity with what happens if you leave all desktops and such.
      
      Test Plan:
      testVirtualDesktops passes (with pending kwayland patch)
      Moving a window in the desktop grid on X11 behaves
      Moving a window in the desktop grid on wayland behaves
      
      Reviewers: #kwin, zzag
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16704
      f521d4bb
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · e6cf2e3e
      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"
      e6cf2e3e
  2. 13 Nov, 2018 4 commits
    • David Edmundson's avatar
      [wayland] add explict AbstractClient::setDesktops(QList) · 2fb2fb9a
      David Edmundson authored
      Summary:
      Currently setDesktop and unsetDesktop were out of sync, with the latter
      missing several important signals and updating of transients.
      
      By using a a shared implementation we avoid that, it also allows for an
      atomic move of a window between desktops.
      
      setDesktop is changed back to be a moval of desktop as it currently
      broke several unit tests as well as changing the behaviour of the move
      to desktop shortcut on wayland.
      
      Test Plan:
      testBindings now passes
      Moved windows with the context menu on X11
      
      Reviewers: #kwin, graesslin
      
      Reviewed By: #kwin, graesslin
      
      Subscribers: graesslin, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16703
      2fb2fb9a
    • Vlad Zahorodnii's avatar
      Merge branch 'Plasma/5.14' · 7e73ad23
      Vlad Zahorodnii authored
      7e73ad23
    • Vlad Zahorodnii's avatar
      [wayland] Don't crash when resizing windows · 406b70b0
      Vlad Zahorodnii authored
      Summary:
      If you resize a decorated client by using the resize user action(press
      Alt + F3 > More Actions > Resize), then KWin will crash because it gets
      stuck in an infinite loop (AbstractClient::performMoveResize <->
      ShellClient::setGeometry).
      
      Here's how KWin gets stuck in that loop:
      * when you finish resizing the client, AbstractClient::keyPressEvent
        will call AbstractClient::finishMoveResize;
      * the first thing that finishMoveResize does is block geometry updates,
        then it does some clean up (e.g. reset the value of isMoveResize(), etc),
        updates the geometry of the client and when it's done, it will emit
        clientFinishUserMoveResized signal;
      * when PointerInputRedirection notices that signal, it will call
        processDecorationMove on the client, which in its turn will indirectly
        call AbstractClient::startMoveResize;
      * when it's time to go back to AbstractClient::keyPressEvent, geometry
        updates are unblocked and if there are any pending geometry updates,
        then ShellClient::setGeometry will be called;
      * ShellClient::setGeometry will eventually call ShellClient::doSetGeometry;
      * ShellClient::doSetGeometry will call AbstractClient::performMoveResize
        because AbstractClient::processDecorationMove indirectly called
        AbstractClient::startMoveResize;
      * AbstractClient::performMoveResize calls ShellClient::setGeometry;
      * (at this point, KWin got stuck in the infinite loop)
      
      This change swaps setMoveResizePointerButtonDown and finishMoveResize,
      so processDecorationMove won't indirectly call startMoveResize.
      
      BUG: 397577
      FIXED-IN: 5.14.4
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16846
      406b70b0
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · b5a2bb2a
      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"
      b5a2bb2a
  3. 12 Nov, 2018 5 commits
    • Vlad Zahorodnii's avatar
      [libkwineffects] Gracefully release previous window pixmap · 688d946f
      Vlad Zahorodnii authored
      Summary:
      If the cross fade animation is cancelled, we are not gracefully
      unreference the previous window pixmap.
      
      This change addresses that issue by using RAII approach to
      reference/unreference the previous window pixmap.
      
      Test Plan: Manually. The Maximize and the Morphing Popups effect still work.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16391
      688d946f
    • Vlad Zahorodnii's avatar
      Don't cache value of popupWindow property in EffectWindow · 93abb9a2
      Vlad Zahorodnii authored
      Summary:
      With the plasma shell protocol, a ShellClient gets its role/window type
      after it's created, so the cached value of the popupWindow property in
      EffectWindow can be wrong.
      
      In addition to that, the value of the popupWindow property still can be
      wrong because plasma shell surfaces don't have xdg-popup role, so we need
      to check NetWM-based window type in ShellClient::isPopupWindow.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16835
      93abb9a2
    • David Edmundson's avatar
      Explicitly link and disable kcrash on kwin_wayland · 5da8b4c7
      David Edmundson authored
      Summary:
      Kwin tried to not use kcrash by not linking against it.
      
      KIO now links against KCrash as we link against KIO we indirectly link
      against KCrash and thus now link and launch kcrash on wayland. This
      breaks coredump.
      
      Arguably it should be fixed in KIO, but it's non-trivial.
      
      The advantage of this approach is it allows us to enable drkonqi for
      nested mode in the future, or make a non-gui drkonqi that just saves
      logs.
      
      Test Plan: Compiles
      
      Reviewers: #kwin, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: zzag, romangg, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16834
      5da8b4c7
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · ac96367d
      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"
      ac96367d
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 3a75ef84
      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"
      3a75ef84
  4. 11 Nov, 2018 1 commit
    • Bhushan Shah's avatar
      effects: attempt to screenshot on OpenGL ES 2.0 instead of failing · e455e349
      Bhushan Shah authored
      Summary:
      Current code path was attempting to use both framebuffer blit and
      glReadPixels on OpenGL ES, instead change the code to use framebuffer
      blit and glGetTexImage on OpenGL and glReadPixels on the OpenGLES as it
      doesn't have glGetTexImage available.
      
      Test Plan: tested on Nexus 5X.
      
      Reviewers: #kwin, davidedmundson, graesslin
      
      Reviewed By: #kwin, graesslin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T10011
      
      Differential Revision: https://phabricator.kde.org/D16802
      e455e349
  5. 09 Nov, 2018 7 commits
  6. 08 Nov, 2018 9 commits
  7. 07 Nov, 2018 12 commits
    • Martin Flöser's avatar
      Unset XKB_DEFAULT_* in tests to make tests better reproducable · 0e839c4d
      Martin Flöser authored
      Summary:
      On one of my systems XKB_DEFAULT_LAYOUT is set to "de". This makes a few
      tests fail, e.g. pointer input and modifier only shortcuts.
      
      The reason is that those tests assume the xkb default layout behavior,
      that is how xkb functions without any layout being set. So having the
      env variable around influences the layout generation.
      
      To prevent this the environment variables are unset and thus a
      reproducable environment is created.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16737
      0e839c4d
    • Martin Flöser's avatar
      Remove potential endless loop from XClipboardSyncTest · e637d432
      Martin Flöser authored
      Summary:
      We need to wait till the helper process created the datadevice. For this
      we used a while loop. On build.kde.org the test gets stuck in this loop
      and times out after 10 minutes.
      
      This change introduces a dedicated signal and we just wait for it. So if
      something fails we wait only 5 sec instead of endless. This should help
      investigate why the test doesn't work on build.kde.org.
      
      Test Plan: Test works locally
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16741
      e637d432
    • Vlad Zahorodnii's avatar
      [libkwineffects] Use correct type for the desktops property · f4663072
      Vlad Zahorodnii authored
      Summary:
      Type of the x11DesktopIds property was changed from QList<int> to
      QVector<int> in KWin core, but not in libkwineffects. That resulted in
      having effects like slide not working because Qt can't implicitly
      convert QVector<int> to QList<int>.
      
      Test Plan: Slide effect works again.
      
      Reviewers: #kwin, graesslin
      
      Reviewed By: #kwin, graesslin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16743
      f4663072
    • Vlad Zahorodnii's avatar
      Merge branch 'Plasma/5.14' · 7b08886e
      Vlad Zahorodnii authored
      7b08886e
    • Vlad Zahorodnii's avatar
      [effects/slidingpopups] Don't crash when sliding virtual desktops · ad28da84
      Vlad Zahorodnii authored
      Summary:
      If you switch virtual desktops while krunner is sliding in, then
      depending on whether your distro strips assert statements away,
      KWin can crash.
      
      The reason why it crashes is the sliding popups effect tries to unref
      deleted windows that it hasn't referenced before (if there is an active
      full screen effect, then popups won't be slided out, which in its turn
      means that we won't reference deleted windows). So, in the end, the
      refcount of those windows can be -1. That triggers an assert statement
      in the destructor of the Deleted class, which checks whether the
      refcount is equal to 0.
      
      Popups are not slided while there is an active full screen effect because
      we don't know what the full screen effect does.
      
      This patch adjusts the sliding popups effect so it stops all active
      animations when user switches virtual desktops or when a full screen
      effect kicks in. We need to do that so the effect won't try to
      unreference windows in postPaintWindow.
      
      Visually, it doesn't look quite nice, but for now that's good enough.
      A proper fix would be more complex: we would need to make sure that
      full screen effects ignore sliding popups (and also maybe docks) and
      perform some input redirection.
      
      BUG: 400170
      FIXED-IN: 5.14.4
      
      Test Plan: I'm not able anymore to reproduce bug 400170.
      
      Reviewers: #kwin, graesslin
      
      Reviewed By: #kwin, graesslin
      
      Subscribers: davidedmundson, graesslin, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16731
      ad28da84
    • David Edmundson's avatar
      [wayland] Fix arguments to clientMaximizedStateChanged(bool, bool) · d2648c6c
      David Edmundson authored
      Summary:
      It should be indicating the current state of horizontal and vertical
      maximisation not whether it changed or not.
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16740
      d2648c6c
    • David Edmundson's avatar
      [wayland] Move AbstractClient::desktops from QList to QVector · 62d334eb
      David Edmundson authored
      Summary:
      Doesn't have any meaningful impact. It's the same performance when T is a pointer,
      but it'll bring it consistent with VirtualDesktopManager::desktops
      
      Reviewers: #kwin, graesslin
      
      Reviewed By: #kwin, graesslin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16736
      62d334eb
    • David Edmundson's avatar
      [TabBox] Fix Arrow Key / Keyboard Events in QML Alt+Tab Skins · c42d1607
      David Edmundson authored
      Summary:
      KWin used to do a quirky trick to send key events to the topmost QQuickItem
      rather than things going to the activeFocus item.
      
      Sending it to the window previously would have failed as the window
      didn't think it was active.
      
      Since 66986d4a we can just let the
      window process the events in a normal QtQuick manner.
      
      BUG: 370185
      Fixed-in: 5.15.0
      
      It will require tabboxes to set focus correctly.
      The ones I tested did.
      
      Most analysis for this patch was done by Chris Holland.
      
      Test Plan:
      Held+alt tab with the "Text" tabbox switcher
      pressed up and down
      
      Reviewers: #kwin, graesslin
      
      Reviewed By: #kwin, graesslin
      
      Subscribers: graesslin, kwin, Zren
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16693
      c42d1607
    • Martin Flöser's avatar
      Start xclipboard sync process from build dir if available · 7221864c
      Martin Flöser authored
      Summary:
      The xclipboard sync test times out on build.kde.org as KWin is not
      installed prior to running the tests. This is due to KWin not finding
      the executable for the clipboard sync helper.
      
      This change looks whether the binary exists in the same directory as
      KWin's executable. If it exists it is started instead of the hardcoded
      path in libexec.
      
      Test Plan: Run the test and verified the correct binary is loaded
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16732
      7221864c
    • Martin Flöser's avatar
      Fix slidingpopupstest when run without installtion · f27f8a26
      Martin Flöser authored
      It tries to load scripted effects, so needs same adjustement.
      f27f8a26
    • Martin Flöser's avatar
      Fix FadeTest and TranslucencyTest when started without install · 43fc7f1b
      Martin Flöser authored
      Summary: Search in build dir for the effects.
      
      Reviewers: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16683
      43fc7f1b
    • Martin Flöser's avatar
      Fix test of scriptedeffectsloader when run from build directory without install · c36f9d29
      Martin Flöser authored
      Summary:
      On build.kde.org all tests loading scripted effects are failing. This
      seems to be because the effects are not installed.
      
      To make this work, this change introduces the following changes:
       * scripted effects are copied to ${build}/bin, like all binaries
       * the test sets XDG_DATA_DIRS env variable to point to ${build}/bin
      
      This change also needs to be added to further tests once this is
      accepted. Furthermore it could be considered whether KPackageLoader
      should consider the QCoreApplication::applicationDirPath in addition to
      the GenericDataLocation. This would make KPackageLoader work much better
      in a build tree only setup.
      
      Test Plan: Test passes locally, obviously not tried on build.kde.org
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D16682
      c36f9d29