D29122: ScreenShotEffect: Add a shouldReturnNativeSize argument to screenshotFullscreen

Méven Car <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
meven added a comment.


  In D29122#655428 <https://phabricator.kde.org/D29122#655428>, @davidedmundson wrote:
  
  > > I think we could consider this interface public API and adding new arguments changes the DBus signature iirc.
  > > Perhaps we should just add a new overload.
  >
  > You're right that DBus would fail if you don't call with the right number of arguments to match a method signature, but you underestimate QtDBus. It's /amaaaazing/
  >
  > Though @meven can you just run qdbus org.kde.KWin /Screenshot org.freedesktop.DBus.Introspectable.Introspect and double check.
  
  
  QtDbus is quite nice indeed, it added the new method assuming it will use defaults:
  
    <method name="screenshotFullscreen">
      <arg name="fd" type="h" direction="in"/>
      <arg name="captureCursor" type="b" direction="in"/>
      <arg name="shouldReturnNativeSize" type="b" direction="in"/>
    </method>
    <method name="screenshotFullscreen">
      <arg name="fd" type="h" direction="in"/>
      <arg name="captureCursor" type="b" direction="in"/>
    </method>
    <method name="screenshotFullscreen">
      <arg name="fd" type="h" direction="in"/>
    </method>
  
  Still perhaps we should have a distinct dbus to make the API clearer.
  AFAIK there is only one user currently : spectacle, that I am updating too anyway.

INLINE COMMENTS

> davidedmundson wrote in screenshot.cpp:409
> Please clear m_cacheOutputsImages so we're not wasting ram

Done line 442

REPOSITORY
  R108 KWin

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

To: meven, #kwin, davidedmundson, bport, zzag, apol
Cc: broulik, 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
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.