1. 25 Oct, 2019 1 commit
    • Vlad Zahorodnii's avatar
      [scripting] Provide conversion functions for AbstractClient · a738ecce
      Vlad Zahorodnii authored
      Summary:
      If no conversion functions are provided for a QObject-subclass, then
      QScriptEngine will use QScriptEngine::newQObject() method without any
      special options to convert an instance of that QObject-subclass to a
      QScriptValue. However, it's very important that every client object is
      wrapped with PreferExistingWrapperObject option. We need that option
      because a script may set a property on a client object and that property
      must remain until it's deleted by the script.
      
      BUG: 413044
      FIXED-IN: 5.17.2
      
      Test Plan: New test.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24944
      a738ecce
  2. 24 Oct, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Don't use MESA_EGL_NO_X11_HEADERS · 8e176c8b
      Vlad Zahorodnii authored
      Summary:
      With recent Mesa updates (19.2.1), MESA_EGL_NO_X11_HEADERS doesn't have
      any effect. So, let's include fixx11h.h instead.
      
      Test Plan: I am able to build kwin once again.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24840
      8e176c8b
  3. 23 Oct, 2019 2 commits
  4. 22 Oct, 2019 3 commits
  5. 20 Oct, 2019 1 commit
  6. 19 Oct, 2019 1 commit
  7. 17 Oct, 2019 1 commit
  8. 15 Oct, 2019 5 commits
    • Fabian Vogt's avatar
      glx: Don't use sRGB configs on llvmpipe with depth 16 · 4982dfd5
      Fabian Vogt authored
      Summary:
      This is necessary to keep openQA working, which uses LLVMpipe as a
      renderer on a Cirrus device that operates in depth 16.
      
      LLVMpipe advertises 24/32 bit sRGB configurations on this setup, but
      they cannot be presented.
      
      CCBUG: 408594
      
      Test Plan: Compile tested only.
      
      Reviewers: fvogt, #kwin, zzag
      
      Reviewed By: fvogt, #kwin, zzag
      
      Subscribers: romangg, sbergeron, fvogt, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D22203
      4982dfd5
    • David Edmundson's avatar
      [aurorae] Fix crash on KCM teardown with Qt5.14 · 446e23af
      David Edmundson authored
      Summary:
      Context behaviour subtly changed in Qt5.14 which has exposed some
      questionable things in this KCM.
      
      Auorae::Decoration is a context property of the loaded QML.
      
      QObject::~QObject signals it's own deletion before deleting children.
      This means the bindings of loaded QML update in particular
      
      aurorae.qml
         DecorationOptions {
              id: options
              deco: decoration
          }
      
      DecorationOptions has a pointer to the previously set decoration which
      is now dangling, and we crash.
      
      Rather than adding more guards and smart pointers in DecorationOptions,
      this patch deletes the QQmlContext before deleting the context
      properties that we expose.
      
      It also moves unreferring the shared qmlcontext we inherit from till
      after we've deleted the child context, because it didn't make sense.
      
      Test Plan:
      Opened KCM
      Closed the KCM
      didn't crash
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24594
      446e23af
    • David Edmundson's avatar
      82f4e03d
    • David Edmundson's avatar
      [tabbox] Correctly set global short on kwin tabbox · 5d4be83d
      David Edmundson authored
      Summary:
      We need to set both the current autoload shortcut and the default
      shortcut. setGlobalShortcut is a convenience method for both.
      
      Otherwise clicking defaults in the keys KCM will discard the shortcut
      forever.
      
      BUG: 407000
      
      Test Plan:
      wiped kglobalshortcutsrc to get a clean slate
      restarted kwin
      alt+tab
      hit defauts in the kwin KCM
      could still alt+tab
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24647
      5d4be83d
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · b967dec7
      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"
      b967dec7
  9. 13 Oct, 2019 1 commit
    • Roman Gilg's avatar
      [platforms/drm] Disable transformations · 1bd2f8ba
      Roman Gilg authored
      Summary:
      Rotation in the past was not working in the DRM backend reliable. Now on 5.17
      it even freezes the KWin session, so for now we need to just disable it trying.
      
      Test Plan:
      Tried to change Rotation with KScreen. Nothing happened but session was still
      usable afterwards.
      
      Reviewers: #kwin
      
      Subscribers: ngraham, jriddell, bshah, zzag, apol, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24112
      1bd2f8ba
  10. 10 Oct, 2019 2 commits
  11. 09 Oct, 2019 1 commit
    • Marco Martin's avatar
      don't allow to resize or move fullscreen windows · 8d847bd0
      Marco Martin authored
      Summary:
      add the same check of the Client class: if a window
      is fullscreen, is not movable nor resizable
      
      Test Plan:
      Doesn't have any visible regression over normal usage,
      this partially tackles a bug that can be seen in plasma mobile:
      if the placement is "maximizing", then asking windows to be
      shown as fullscreen has no effect and they will always be shown as a normal
      maximized window.
      
      this now doesn't happen anymore.. most of the times,
       as there must be some race condition
      as a concause of the problem
      
      Reviewers: #plasma, davidedmundson
      
      Reviewed By: #plasma, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24515
      8d847bd0
  12. 08 Oct, 2019 1 commit
  13. 07 Oct, 2019 1 commit
  14. 01 Oct, 2019 1 commit
    • Alexey Min's avatar
      [platforms/hwcomposer] Fix build failure after D23495 · 6ee6cc02
      Alexey Min authored
          In file included from /build/src/kwin-5.16.90/plugins/platforms/hwcomposer/hwcomposer_backend.cpp:21:
          /build/src/kwin-5.16.90/plugins/platforms/hwcomposer/hwcomposer_backend.h:58:11: error:
          'QSize KWin::HwcomposerOutput::pixelSize() const' marked 'override', but does not override
             58 |     QSize pixelSize() const override;
                |           ^~~~~~~~~
      
      Fixes dbb2cede
      
      Reviewed-by: default avatarBhushan Shah <bshah@kde.org>
      6ee6cc02
  15. 29 Sep, 2019 2 commits
  16. 26 Sep, 2019 6 commits
    • David Edmundson's avatar
      Use lambdas for queued invocation of composition suspending · 3ba33e4b
      David Edmundson authored
      Summary:
      Qt's metaobject is rather sensitive with scope resolution.
      
      Foo::Bar and Bar don't always match to a Qt metaobject, even if they
      refer to the same thing to a compiler. Here we register
      X11Compositor::SuspendReason but Q_ARG uses SuspendReason and they don't
      match. This leads to a runtime failure where the method isn't invoked.
      
      Rather than fixing metaobject usage, port the whole thing to lambdas
      which does better compile time checking and is generally nicer to read.
      
      BUG: 412353
      
      Test Plan:
      Ran xprop to block compositing. Compositing was blocked.
      Grepped source code for Q_ARG use
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24244
      3ba33e4b
    • Vlad Zahorodnii's avatar
      [nightcolor] Print a debug message upon receiving new location from kded module · 08642875
      Vlad Zahorodnii authored
      Summary:
      This can be useful for debugging whether Night Color manager actually
      receives new location data from colorcorrectlocationupdater kded module.
      
      CCBUG: 412211
      
      Test Plan:
      Run kwin with QT_LOGGING_RULES="kwin_colorcorrection.debug=true"
      
      Run from the terminal the following two commands
          qdbus org.kde.kded5 /kded unloadModule colorcorrectlocationupdater
          qdbus org.kde.kded5 /kded loadModule colorcorrectlocationupdater
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24236
      08642875
    • Vlad Zahorodnii's avatar
      [nightcolor] Add missing const qualifiers · 03d78231
      Vlad Zahorodnii authored
      Summary: Mark some immutable variables with const to improve code readability.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin, davidedmundson, romangg
      
      Reviewed By: #kwin, davidedmundson, romangg
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24235
      03d78231
    • Vlad Zahorodnii's avatar
      [nightcolor] Use local time in Automatic and Location mode · c265c7f2
      Vlad Zahorodnii authored
      Summary:
      Currently Night Color doesn't handle time zones very well. For example,
      if the user's time zone is UTC-8, then computed timings of sunrise and
      sunset (in UTC) will be a bit gibberish as sunset occurs before sunrise
      rather than vice versa.
      
      This change switches relevant parts of Night Color to local time in
      order to fix expectations about the order of morning and evening in
      updateSunTimings() method as well to simplify the code a bit (dealing
      with UTC and local time can be painful sometimes).
      
      CCBUG: 412211
      
      Reviewers: #kwin, romangg
      
      Reviewed By: #kwin, romangg
      
      Subscribers: romangg, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24153
      c265c7f2
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 8ba7bc42
      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"
      8ba7bc42
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 3e7d9cd1
      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"
      3e7d9cd1
  17. 24 Sep, 2019 1 commit
  18. 23 Sep, 2019 1 commit
  19. 22 Sep, 2019 1 commit
  20. 20 Sep, 2019 1 commit
  21. 19 Sep, 2019 4 commits
    • Vlad Zahorodnii's avatar
      Use nullptr everywhere · 62a7db70
      Vlad Zahorodnii authored
      Summary:
      Because KWin is a very old project, we use three kinds of null pointer
      literals: 0, NULL, and nullptr. Since C++11, it's recommended to use
      nullptr keyword.
      
      This change converts all usages of 0 and NULL literal to nullptr. Even
      though it breaks git history, we need to do it in order to have consistent
      code as well to ease code reviews (it's very tempting for some people to
      add unrelated changes to their patches, e.g. converting NULL to nullptr).
      
      Test Plan: Compiles.
      
      Reviewers: #kwin, davidedmundson, romangg
      
      Reviewed By: #kwin, davidedmundson, romangg
      
      Subscribers: romangg, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D23618
      62a7db70
    • Bhushan Shah's avatar
      [platforms/drm] introduce env var to select GPU · 6b610927
      Bhushan Shah authored
      Summary:
      In some environemnts it is possible that udev detection of primary GPU
      fails and it picks the first available card (normally card0). But it is
      not desired, and it would be required to use different card (card1).
      
      Introduce environment variable, which when used, will make it possible
      to use different card node then one selected by udev.
      
      You can use it like KWIN_DRM_DEVICE_NODE=/dev/dri/card1 kwin_wayland
      
      Test Plan: Tested on the device where card0 was not usable for kms, but card1
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24051
      6b610927
    • Jonathan Riddell's avatar
      Update version number for 5.16.90 · 48691c40
      Jonathan Riddell authored
      GIT_SILENT
      48691c40
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 2806d5f6
      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"
      2806d5f6
  22. 18 Sep, 2019 2 commits
    • Anton Smerkov's avatar
      Emphasize minimization in MinimizeAll script · fec0ab81
      Anton Smerkov authored and Vlad Zahorodnii's avatar Vlad Zahorodnii committed
      Summary:
      MinimizeAll should work as follows:
      
      > As long as there's something to minimize, do that.
      > Otherwise unminimize only the windows we minimized
      > on last invocation.
      
      Quote above is from Comment 11 by Thomas Lübking of BUG: 356161.
      
      But current code does not fulfill these duties. Try next case: run minimizeall on some windows, then click on one of windows, then run minimizeall again. All windows would be unminimized!
      
      I have tried to make small changes to original code of main.js, but i can't because i don't understand it.
      
      Thats why i wrote my own version. Then i changed my version to version of zzag, because his code is more simple. I have tested both versions.
      
      BUG: 356161
      
      Reviewers: colomar, #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: romangg, zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24044
      fec0ab81
    • Vlad Zahorodnii's avatar
      Port away from deprecated QString::sprintf · 2ad37c44
      Vlad Zahorodnii authored
      Test Plan: Compiles.
      
      Reviewers: #kwin, apol
      
      Reviewed By: apol
      
      Subscribers: apol, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D24045
      2ad37c44