Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix freeze when requesting clipboard image from our own window #83970

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions platform/linuxbsd/x11/display_server_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ Atom DisplayServerX11::_clipboard_get_image_target(Atom p_source, Window x11_win
unsigned long atom_count = 0;

Window selection_owner = XGetSelectionOwner(x11_display, p_source);
if (selection_owner != None) {
if (selection_owner != None && selection_owner != x11_window) {
Riteo marked this conversation as resolved.
Show resolved Hide resolved
// Block events polling while processing selection events.
MutexLock mutex_lock(events_mutex);

Expand Down Expand Up @@ -783,7 +783,7 @@ Ref<Image> DisplayServerX11::clipboard_get_image() const {

Window selection_owner = XGetSelectionOwner(x11_display, clipboard);

if (selection_owner != None) {
if (selection_owner != None && selection_owner != x11_window) {
// Block events polling while processing selection events.
MutexLock mutex_lock(events_mutex);

Expand Down