1. 01 Sep, 2020 1 commit
  2. 07 Aug, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Prettify license headers · 4ce853e8
      Vlad Zahorodnii authored
    • Vlad Zahorodnii's avatar
      Switch to SPDX license markers · 1fb9f6f1
      Vlad Zahorodnii authored
      The main advantage of SPDX license identifiers over the traditional
      license headers is that it's more difficult to overlook inappropriate
      licenses for kwin, for example GPL 3. We also don't have to copy a
      lot of boilerplate text.
      In order to create this change, I ran licensedigger -r -c from the
      toplevel source directory.
  3. 01 Apr, 2020 1 commit
    • Aleix Pol Gonzalez's avatar
      Reduce the amount of objects that are compiled several times · dbac4bce
      Aleix Pol Gonzalez authored
      We build some objects several times which makes it uncomfortable to develop KWin
      since every time we modify something a lot of things get rebuilt. This should
      help a bit although it doesn't solve all the problems.
      Test Plan: Builds, tests pass
      Reviewers: #kwin, zzag
      Reviewed By: #kwin, zzag
      Subscribers: davidedmundson, zzag, anthonyfieroni, iasensio, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D28445
  4. 19 Sep, 2019 2 commits
    • Vlad Zahorodnii's avatar
      Don't initialize QFlags<T> with nullptr · b8a6fd7c
      Vlad Zahorodnii authored
      Summary: This looks very odd.
      Test Plan: Compiles.
      Reviewers: #kwin, romangg
      Reviewed By: #kwin, romangg
      Subscribers: apol, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D24086
    • Vlad Zahorodnii's avatar
      Use nullptr everywhere · 62a7db70
      Vlad Zahorodnii authored
      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
  5. 07 Sep, 2019 1 commit
  6. 06 Sep, 2019 1 commit
  7. 31 Aug, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Switch to Q_ASSERT · 7a3722b4
      Vlad Zahorodnii authored
      Switch to Q_ASSERT in order to make code a bit more consistent. We have
      places where both assert and Q_ASSERT are used next to each other. Also,
      distributions like Ubuntu don't strip away assert(), let's hope that
      things are a bit different with Q_ASSERT.
      Test Plan: Compiles.
      Reviewers: #kwin, davidedmundson
      Reviewed By: #kwin, davidedmundson
      Subscribers: romangg, davidedmundson, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D23605
  8. 11 Aug, 2019 1 commit
    • Frederik Gladhorn's avatar
      Fix warning: -Wdeprecated-copy - implement StrutRect::operator= · dd944b2d
      Frederik Gladhorn authored
      /home/frederik/kdesrc/kde/workspace/kwin/geometry.cpp:156:88: warning: implicitly-declared ‘constexpr KWin::StrutRect& KWin::StrutRect::operator=(const KWin::StrutRect&)’ is deprecated [-Wdeprecated-copy]
        156 |             *strut = StrutRect((*strut).intersected(clientsScreenRect), (*strut).area());
            |                                                                                        ^
      In file included from /home/frederik/kdesrc/kde/workspace/kwin/rules.h:32,
                       from /home/frederik/kdesrc/kde/workspace/kwin/client.h:27,
                       from /home/frederik/kdesrc/kde/workspace/kwin/geometry.cpp:30:
      /home/frederik/kdesrc/kde/workspace/kwin/utils.h:113:5: note: because ‘KWin::StrutRect’ has user-provided ‘KWin::StrutRect::StrutRect(const KWin::StrutRect&)’
        113 |     StrutRect(const StrutRect& other);
            |     ^~~~~~~~~
      Reviewers: #kwin, zzag
      Reviewed By: #kwin, zzag
      Subscribers: zzag, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D23084
  9. 09 Jul, 2019 1 commit
  10. 10 Dec, 2018 1 commit
  11. 23 Sep, 2017 1 commit
  12. 24 Aug, 2017 1 commit
    • Martin Flöser's avatar
      Move updateXTime into the X11 standalone platform · 1cc38c92
      Martin Flöser authored
      KWin::updateXTime only delegates into the platform API where the method
      is a no-op. The actual implementation is moved into the X11 standalone
      platform as it uses QX11Info which is non functional except on the X11
      standalone platform.
      This change exposes a problem with timestamp handling: on Wayland the
      X11 timestamp does not get updated at all, causing e.g. window sync not
      work correctly (c.f. bug 374881). We cannot implement the updating in the
      same way as QX11Info/Qt xcb platform does it as that would introduce a
      blocking roundtrip to XWayland which is dangerous.
      As a side-effect this change removes linking to Qt5::X11Extras in kwin
      core as it's no longer needed.
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D7515
  13. 03 May, 2017 1 commit
    • Martin Flöser's avatar
      Improve the x11 timestamp handling · 0bec9ad7
      Martin Flöser authored
      So far KWin only updated the x11 timestamp if the new timestamp is larger
      than the existing one. While this is a useful thing it creates problems
      when the 32 bit msec based time stamp wraps around which happens after
      running an X server for 49 days. After the timestamp wrapped around KWin
      would not update the timestamp any more and thus some calls might fail.
      Most prominent victims are keyboard and pointer grab which fails as the
      timestamp is either larger than the server timestamp or smaller than the
      last grab timestamp.
      Another problem related to timestamp handling is KWin getting broken by
      wrong timestamps sent by applications. A prominent example is clusterssh
      which used to send a timestamp as unix time which is larger than the
      x timestamp and thus our timestamp gets too large.
      This change addresses these problems by allowing to reset the timestamp.
      This is only used from updateXTime (which is normally invoked before we
      do things like grabKeyboard). Thus we make QX11Info::getTimestamp the
      ultimate trusted source for timestamps.
      BUG: 377901
      BUG: 348569
      FIXED-IN: 5.8.7
      Test Plan: As I cannot wait 50 days: unit tests for the two conditions added.
      Reviewers: #kwin, #plasma
      Subscribers: plasma-devel, kwin
      Tags: #kwin
      Differential Revision: https://phabricator.kde.org/D5704
  14. 16 Nov, 2016 1 commit
    • Martin Flöser's avatar
      Remove KWin::display from kwinglobals · 346619aa
      Martin Flöser authored
      And finally nothing inside libkwineffects, libkwinglutils,
      libkwinxrenderutils and kwineffect and kwin core uses KWin::display.
      We are finally XLib free!
      This change drops KWin::display and removes the include to QX11Info from
      kwinglobals.h. And the libraries no longer need to link X11Extras.  Due
      to that removal a few seeming unrelated changes are required to add the
      include where needed and linkage to X11Extras.
      The biggest change is to x11 platform plugin which still needs the
      display and caches it in the Platform and passes it to various places in
      a way that the code doesn't need to be adjusted.
      Reviewers: #kwin, #plasma_on_wayland
      Subscribers: plasma-devel, kwin
      Tags: #plasma_on_wayland, #kwin
      Differential Revision: https://phabricator.kde.org/D3337
  15. 01 Feb, 2016 1 commit
  16. 15 Dec, 2015 1 commit
    • Martin Flöser's avatar
      Unblock signals in child processes · 14b9046a
      Martin Flöser authored
      We need to unblock the signals blocked with pthread_sigmask.
      This caused kdeinit to block, because it relies on SIGUSR1.
      BUG: 356580
      FIXED-IN: 5.5.1
      REVIEW: 126361
  17. 31 Jul, 2015 1 commit
  18. 23 Feb, 2015 1 commit
    • Martin Flöser's avatar
      Migrate away from QX11Info::appTime · d95ab94f
      Martin Flöser authored
      The porting to Qt5 broke the timestamp handling in many areas. A deeper
      look into Qt's xcb plugin shows that the appTime handling is not
      sufficient for KWin's need. E.g. the time is only updated in response to
      a property notify event if it's for a Qt created window, which is hardly
      ever the case in KWin. Another example is that key press/release events
      never updated the appTime.
      As the functionality in Qt is rather trivial we can do the timestamp
      handling ourselves. We filter all events anyway and it is slightly faster
      as we don't have to go through the QPA interface any more.
      REVIEW: 122636
  19. 05 Dec, 2014 1 commit
  20. 17 Apr, 2014 1 commit
    • Martin Flöser's avatar
      [Xcb::Wrapper] Introduce a Property and StringProperty Wrapper subclass · b45eeae3
      Martin Flöser authored
      The Xcb::Property can wrap the xcb_get_property call and provides
      convenient access methods to read the value of the reply with checks
      applied. For this it provides a templated ::value method for reading a
      single value or reading an array. There's also a ::toBool and
      ::toByteArray which performs the conversion directly with default values
      for the type and format checks.
      Xcb::TransientFor is changed to be derived from Property instead of
      Wrapper directly, so that the reading of the property value can be
      Xcb::StringProperty is a convenient wrapper derived from Property to
      handle the reading of a string property providing a cast to QByteArray
      operator. This replaces the ::getStringProperty from utils. Though the
      separator functionality from ::getStringProperty is not provided as that
      is only used in one function and handled there.
      All the custom usages of xcb_get_property or getStringProperty are
      replaced to use this new wrapper. That simplifies the code and ensures
      that all properties are read in the same way.
      REVIEW: 117574
  21. 25 Mar, 2014 1 commit
    • Martin Flöser's avatar
      [kwin] Remove cursorPos() from utils.h · 9075b5e2
      Martin Flöser authored
      Only delegated to Cursor::pos() anyway, so let's just use that directly.
      Fixes the annoyances of having to mock it in the unit tests which include
      REVIEW: 116900
  22. 19 Mar, 2014 1 commit
  23. 29 Jan, 2014 1 commit
  24. 30 Sep, 2013 1 commit
  25. 10 Sep, 2013 1 commit
    • Martin Flöser's avatar
      Use Xcb::Atom in KWin::Atoms to resolve all atoms · 10825219
      Martin Flöser authored
      During startup we only create the request, the reply will be fetched
      once the atom is needed.
      To make proper use of this async behavior the creation of Atoms is
      moved directly to the claim of the manager selection, so they can be
      fetched while we wait for the previous manager selection to give up
      on it.
  26. 02 Sep, 2013 1 commit
  27. 20 Aug, 2013 2 commits
  28. 13 Aug, 2013 1 commit
    • Martin Flöser's avatar
      updateXTime uses QX11Info::getTimestamp · 95f10a6c
      Martin Flöser authored
      Requires 9c45260942c0ee32267e651d981bfa33a6acb64d from qtx11extras.
      Note: this does not fully replace the functionality which we used to
      have. The event queue is not yet searched for the first even with a
  29. 24 Jul, 2013 1 commit
  30. 13 May, 2013 5 commits
  31. 01 May, 2013 1 commit
  32. 26 Apr, 2013 2 commits
    • Martin Flöser's avatar
      Move ShortcutDialog to useractions · 4a28d000
      Martin Flöser authored
      It's only used from useractions.cpp which means that it's not the best
      fit in utils. We can see the problems with it given that it was in an
      ifdef and it included quite some headers into everything.
      REVIEW: 110189
    • Martin Flöser's avatar
      Cleanup of includes in utils.h · 22ecba3b
      Martin Flöser authored
      * removed unneeded includes
      * reordered
      * camel case
      REVIEW: 110188