1. 10 Jun, 2020 4 commits
    • Alain Knaff's avatar
      [x11] Send a valid timestamp in TakeFocus messages · e9c68f36
      Alain Knaff authored
      Kwin sends out undated WM_TAKE_FOCUS client messages. Gtk based
      applications such as Firefox react to these by handing focus to one of
      their subwindows using XSetInputFocus(), and pass on the null time field
      that they received in the client message to XSetInputFocus().
      
      If for whatever reason the application (firefox) is slow to process the
      event, it might issue that XSetInputFocus() message at a time when it
      has already lost focus to the next application. This results in Firefox
      stealing back the focus from the next application. Normally, such an
      occurrence would not happen, as the server could tell by the time field
      that the message is stale.
      
      Until 2016 (e73e331f) kwin *used* to
      send a valid timestamp, but this got deliberately broken to appease some
      Java Applications which were "extremely picky" and would refuse focus.
      
      This was based on the assumption that no other toolkit used the
      timestamp from take focus events which is now proven to be false.
      
      ICCCM document states:
      
      Windows with the atom WM_TAKE_FOCUS in their WM_PROTOCOLS property may
      receive  a ClientMessage event from the window manager (as described in
      section 4.2.8) with WM_TAKE_FOCUS in its data[0] field and a valid
      timestamp (i.e. not CurrentTime ) in its data[1] field."
      
      BUG: 421068
      e9c68f36
    • Vlad Zahorodnii's avatar
      [scene] Setup scene window connections with correct receiver object · c890996a
      Vlad Zahorodnii authored
      We need a couple of connections to ensure that the window pixmap, the
      window quad cache, and the window shape get discarded when the geometry
      of the toplevel has been changed. Currently, those connections are
      created with the receiver object being the scene. The problem is that
      the associated wayland surface may outlive the toplevel and we don't
      cleanup the connections after the scene window has been destroyed.
      
      The fact that the connections don't get destroyed can lead to accessing
      dangling pointers, which may result in a crash.
      
      In order to ensure that the connections are broken automatically when
      the scene window is destroyed, we need to ensure that the received
      object is the scene window. That way, the connections will be destroyed
      automatically.
      c890996a
    • Vlad Zahorodnii's avatar
      [scene] Rename a scene window method · 430b63d1
      Vlad Zahorodnii authored
      This change renames invalidateQuadsCache() to discardQuads() because the
      latter name is shorter and it aligns with pre-existing method names.
      430b63d1
    • Vlad Zahorodnii's avatar
      [scene] Make the scene window a qobject · cb4dc0ff
      Vlad Zahorodnii authored
      Since the scene window is not a QObject, we cannot connect toplevel's
      signals directly to the scene window's slots.
      cb4dc0ff
  2. 07 Jun, 2020 3 commits
  3. 05 Jun, 2020 4 commits
    • Adriaan de Groot's avatar
      Handle differences in paths for Linux vs FreeBSD · fcba2780
      Adriaan de Groot authored
      - The name of tty devices is different; put detection into
        the CMakeLists and pass that as a define when building
        virtual_terminal.cpp -- this means no ifdeffery for the path.
      - The name of dri devices is different; FreeBSD just has one.
      fcba2780
    • Adriaan de Groot's avatar
      Fix virtual_terminal.cpp build on FreeBSD · 8826c7ff
      Adriaan de Groot authored
      - need to shuffle some Linux includes behind an ifdef, and some
        FreeBSD ones as well
      - FreeBSD has no notion of major device numbers anymore, so the
        isTty() function can't really tell. Just ignore the check --
        I'm assuming the somewhat-standard isatty() doesn't do what
        is wanted, since otherwise it would be used.
      8826c7ff
    • Tobias C. Berner's avatar
      Add Findepoll.cmake · 33aff4fc
      Tobias C. Berner authored
      - On FreeBSD epoll.h if provided through a library (from a port, epoll-shim)
        that emulates the Linux behavior. Make a CMake module for it to hide
        differences in systems behind a module.
      - Find epoll on FreeBSD and link to it
      
      Now on FreeBSD, tries to compile virtual_terminal.cpp, which will fail because
      that needs more patches.
      33aff4fc
    • Adriaan de Groot's avatar
      Consolidate target_link_libraries() calls · 0dce25ba
      Adriaan de Groot authored
      There's no reason I can find for the various calls to
      target_link_libraries to be separate, separated by export headers
      0dce25ba
  4. 04 Jun, 2020 2 commits
  5. 03 Jun, 2020 7 commits
  6. 02 Jun, 2020 7 commits
  7. 01 Jun, 2020 10 commits
    • Vlad Zahorodnii's avatar
      Fix build · 71bc60f4
      Vlad Zahorodnii authored
      71bc60f4
    • Ismael Asensio's avatar
      Merge branch 'Plasma/5.19' · 13f061af
      Ismael Asensio authored
      13f061af
    • Ismael Asensio's avatar
      [kcm/kwinrules] Fix "window role" combo not showing up · 0a06ee12
      Ismael Asensio authored
      Correctly set the policy of `windowrole` property to `StringMatch`.
      
      BUG: 422302
      FIXED-IN: 5.19
      0a06ee12
    • Vlad Zahorodnii's avatar
      [effects/logout] Start the animation on only windowAdded or windowClosed · b028ae56
      Vlad Zahorodnii authored
      windowShown and windowHidden are emitted when the window becomes visible
      and hidden, respectively. For example, that can be the case when the
      window has been minimized or unminimized. We have to start animations
      only when windowAdded or windowClosed has been emitted.
      b028ae56
    • Vlad Zahorodnii's avatar
      [effects/slidingpopups] Start the animation on only windowAdded or windowClosed · 9d4c8fda
      Vlad Zahorodnii authored
      windowShown and windowHidden are emitted when the window becomes visible
      and hidden, respectively. For example, that can be the case when the
      window has been minimized or unminimized. We have to start animations
      only when windowAdded or windowClosed has been emitted.
      9d4c8fda
    • Vlad Zahorodnii's avatar
      [effects/fade] Start the animation on only windowAdded or windowClosed · 6f822b22
      Vlad Zahorodnii authored
      windowShown and windowHidden are emitted when the window becomes visible
      and hidden, respectively. For example, that can be the case when the
      window has been minimized or unminimized. We have to start animations
      only when windowAdded or windowClosed has been emitted.
      6f822b22
    • Vlad Zahorodnii's avatar
      [wayland] Destroy XdgToplevelClient and XdgPopupClient on unmap · df9e36ee
      Vlad Zahorodnii authored
      There are several ways to handle unmapping of a wl_surface. The first
      one is to destroy the associated AbstractClient instance. The second one
      is to transition the AbstractClient in a special state.
      
      The problem with the second approach is that it makes animations such as
      fade out more difficult to handle since effects in kwin are geared more
      towards the first approach (destroying AbstractClient).
      df9e36ee
    • Vlad Zahorodnii's avatar
      [wayland] Rework xdg-shell implementation · 31ea780d
      Vlad Zahorodnii authored
      Summary:
      This change splits the XdgShellClient class to better match existing
      abstractions in the xdg-shell protocol and fix a few issues related to
      sending configure events.
      
      In the new client classes, configure events are handled differently.
      Instead of blocking configure events, we try to send them as late as
      possible. Delaying configure events will let us merge changeMaximize()
      for X11 clients and Wayland clients and it also fixes the bug where
      we don't send the final configure event when user has finished resizing
      a window.
      
      Given that configure events are not sent immediately, XdgSurfaceClient
      keeps the last requested frame geometry and the last requested client
      geometry.
      
      This patch doesn't intend to fix all issues in kwin's implementation of
      the xdg-shell protocol. For example, we still handle surface unmapping
      very poorly.
      
      Test Plan: Tests pass.
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D27861
      31ea780d
    • Vlad Zahorodnii's avatar
      [effects/zoom] Implement text caret tracking · 076b8bc1
      Vlad Zahorodnii authored
      The text caret tracking feature allows to keep the text caret inside the
      zoomed area. It can be especially useful when the zoomed area is smaller
      than the text editor.
      
      BUG: 362189
      076b8bc1
    • Vlad Zahorodnii's avatar
      [effects/zoom] Implement focus tracking with QAccessibilityClient · c1ea0412
      Vlad Zahorodnii authored
      Currently, the focus tracking functionality in the zoom effect does not
      work because it relies on kaccessibleapp, which is dead. Luckily for us,
      there is a library called libqaccessibilityclient that provides a way
      to monitor focus changes.
      
      BUG: 421234
      c1ea0412
  8. 31 May, 2020 3 commits