D29272: Add support to keyboard shortcuts inhibitor

Vlad Zahorodnii <[email protected]> Mon, 25 May 2020 10:02:32 +0000
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag added inline comments.

INLINE COMMENTS

> wayland_server.cpp:838-839
> +{
> +    SeatInterface *current_seat = seat();
> +    auto surface = current_seat->focusedKeyboardSurface();
> +    if (surface) {

Can be simplified to just seat()->focusedKeyboardSurface() and no snake case.

> wayland_server.cpp:841
> +    if (surface) {
> +        auto inhibitor = waylandServer()->keyboardShortcutsInhibitManager()->findInhibitor(surface, current_seat);
> +        return inhibitor && inhibitor->isActive();

Please drop `waylandServer()`, it's already an instance of WaylandServer.

REPOSITORY
  R108 KWin

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

To: bport, davidedmundson, zzag
Cc: romangg, broulik, apol, 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, jensreuterberg, abetts, sebas, ahiemstra, mart