kmaterka added inline comments.

INLINE COMMENTS

> davidedmundson wrote in sniproxy.cpp:154
> can you explain the swapping 0 and m_containerWid here?

I knew someone will ask, I wanted to add comment here but you were too quick :)

I was not following the standard - worked because most clients (including Qt) 
ignores parent window. Wine is using d[3] field to read parent window.

I checked other implementations on github, most (but "i3") uses data[3] to set 
parent window.

From specification 
<https://specifications.freedesktop.org/xembed-spec/xembed-spec-latest.html#idm46049198742880>:

> An XEmbed message is an X11 client message with message type "_XEMBED". The 
> format is 32, the first three data longs carry the toolkit's X time (l[0]), 
> the message's major opcode (l[1]) and the message's detail code (l[2]). If no 
> detail is required, the value passed has to be 0. The remaining **two data 
> longs (l[3] and l[4]) are reserved for data1 and data2**. Unused bytes of the 
> client message are set to 0. The event is sent to the target window with no 
> event mask and propagation turned off.

...

> **data1**     The embedder's window handle.

So data1 = l[3] = ev.data.data32[3]

REPOSITORY
  R120 Plasma Workspace

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

To: kmaterka, #plasma_workspaces, #plasma, davidedmundson
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, 
GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, ahiemstra, mart

Reply via email to