https://bugs.kde.org/show_bug.cgi?id=474686

            Bug ID: 474686
           Summary: Setting a value to Clipboard via a button in an
                    unfocused window does not work.
    Classification: Plasma
           Product: kwin
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: kwin-bugs-n...@kde.org
          Reporter: zhangtin...@uniontech.com
  Target Milestone: ---

SUMMARY
***
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()`.

***


STEPS TO REPRODUCE
1. Create a Qt window, set the `Qt::WindowDoesNotAcceptFocus` property
2. Create a button in which the button function is to set a value to the
QClipboard
3. Clicked the button and found it impossible to paste in other apps

OBSERVED RESULT
Write values cannot be pasted by other applications

EXPECTED RESULT
Write values that can be pasted by other applications

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?
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 5.11.3

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to