D15061: [xwl] Generic X selections translation mechanism with Clipboard support

Vlad Zagorodniy <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag added inline comments.

INLINE COMMENTS

> databridge.cpp:95-101
> +    auto getSelection = [this](xcb_atom_t atom) -> Selection* {
> +        if (atom == atoms->clipboard) {
> +            return m_clipboard;
> +        }
> +        return nullptr;
> +    };
> +    auto *sel = getSelection(event->selection);

The lambda is superfluous.

> selection.cpp:132
> +            return true;
> +        }
> +    case XCB_PROPERTY_NOTIFY:

Is compiler happy about this?

> selection.cpp:234
> +
> +    if (!workspace()->activeClient() || !workspace()->activeClient()->inherits("KWin::Client")) {
> +        // Receiving Wayland selection not allowed when no Xwayland surface active

Can't we do qobject_cast<Client *>(workspace()->activeClient()) == nullptr?

> selection.h:80
> +protected:
> +    explicit Selection(xcb_atom_t atom, QObject *parent);
> +    void registerXfixes();

Why explicit?

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

To: romangg, #kwin
Cc: zzag, graesslin, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.