[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: The issue of Qt application being unable to write data to the clipboard when performing write operat
From: "=?utf-8?B?5byg5bu35a6J?=" <zhangtingan () uniontech ! com>
Date: 2023-09-18 9:07:51
Message-ID: tencent_507961602486409B173B6AA9 () qq ! com
[Download RAW message or body]
[Attachment #2 (text/plain)]
Hello,
I noticed that in Wayland protocol, when I perform a copy operation in a program, the \
protocol performs some data operations through `SetSelection` function. But when I \
set `Qt::WindowDoesNotAcceptFocus` via Qt in this program and write data via \
`setText` operation in `QClipboard`, the function `updateSelection` in Wayland will \
not send the `setSelection` signal. I found that the following code is causing the \
signal not to be sent.
`*globalKeyboard.focus.surface->client() == dataDevice->client()`.
may i ask why this judgment is necessary, and if I want my app to write clipboard \
data without getting focus, is there an alternative way I can do it?
Interested to hear back.
Best Regards.
[Attachment #3 (text/html)]
<div><font><div>Hello,</div><div><br></div><div>I noticed that in Wayland protocol, \
when I perform a copy operation in a program, the protocol performs some data \
operations through `SetSelection` function.</div><div>But when I set \
`Qt::WindowDoesNotAcceptFocus` via Qt in this program and write data via `setText` \
operation in `QClipboard`, the function `updateSelection` in Wayland will not send \
the `setSelection` signal. I found that the following code is causing the signal not \
to be sent.</div><div><br></div><div>`*globalKeyboard.focus.surface->client() == \
dataDevice->client()`.</div><div><br></div><div>may i ask why this judgment is \
necessary, and if I want my app to write clipboard data without getting focus, is \
there an alternative way I can do it?</div><div><div><br></div><div>Interested to \
hear back.</div><div><br></div><div>Best \
Regards.</div></div></font></div><div><includetail><!--<![endif]--></includetail></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic