D28674: Implement a updateXTime compatible with Xcb and XWayland

Vlad Zahorodnii noreply at phabricator.kde.org
Tue Apr 14 11:38:43 BST 2020


zzag requested changes to this revision.
zzag added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> CMakeLists.txt:512
>      xwl/xwayland_interface.cpp
> +    sync_filter.cpp
>  )

Rename the class to SyncAlarmNotifyX11Filter or something.

> main.cpp:376-378
> +            kwinApp()->setX11Time(time, Application::TimestampUpdate::Always);
> +            xcb_delete_property(connection(), m_rootWindow, atoms->clipboard);
> +            m_updatingXTimer = false;

It would be nice to have a comment that explains what is going on here.

> platform.cpp:55-61
> +    connect(kwinApp(), &Application::workspaceCreated, this,
> +        [this] {
> +            if (Xcb::Extensions::self()->isSyncAvailable()) {
> +                m_syncFilter = std::make_unique<SyncFilter>();
> +            }
> +        }
> +    );

Move/resize operations is something that Workspace needs to be concerned about. Please create the filter in Workspace::initWithX11().

> platform.cpp:517-524
> +/*
> + Updates xTime(). This used to simply fetch current timestamp from the server,
> + but that can cause xTime() to be newer than timestamp of events that are
> + still in our events queue, thus e.g. making XSetInputFocus() caused by such
> + event to be ignored. Therefore events queue is searched for first
> + event with timestamp, and extra PropertyNotify is generated in order to make
> + sure such event is found.

While you're on this, could you please re-format this comment?

  /**
   * Heart touching doxygen comment.
   */
  void Platform::updateXTime()
  {
  }

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D28674

To: meven, #kwin, davidedmundson, zzag
Cc: kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200414/bad8da35/attachment-0001.html>


More information about the kwin mailing list