D28283: Remove overloads on virtual methods

Vlad Zahorodnii noreply at phabricator.kde.org
Wed Mar 25 16:22:07 GMT 2020


zzag added a comment.


  What I had back in my mind was to eventually introduce something like requestedClientGeometry(), requestedFrameGeometry(), and doSetGeometry() in AbstractClient. It would allow us to get rid of the `force` parameter, merge code that forces shaded geometry, and un-virtualize setFrameGeometry(), but code refactoring in this patch is also fine.
  
  I have a few nitpicks, could you please address them before I click "Accept Revision"?

INLINE COMMENTS

> internal_client.cpp:309
> +    const QRect area = workspace()->clientArea(WorkArea, this);
> +    setFrameGeometry({pos(), size.boundedTo(area.size())}, force);
>  }

I don't like that the QRect type is erased. IMHO, it reduces readability. What about being explicit?

  setFrameGeometry(QRect(pos(), size.boundedTo(area.size()), force);

It's a bit longer, but imho more readable.

> x11client.cpp:4183
>   */
> -void X11Client::setFrameGeometry(int x, int y, int w, int h, ForceGeometry_t force)
> +void X11Client::setFrameGeometry(const QRect &_frameGeometry, ForceGeometry_t force)
>  {

s/_frameGeometry/rect/

REPOSITORY
  R108 KWin

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

To: apol, #kwin
Cc: zzag, kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, 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/20200325/bb9a481c/attachment-0001.html>


More information about the kwin mailing list