|
|
|
|
@ -10,7 +10,6 @@ |
|
|
|
|
#include "clipboard.h" |
|
|
|
|
#include "dnd.h" |
|
|
|
|
#include "selection.h" |
|
|
|
|
#include "xcbutils.h" |
|
|
|
|
#include "xwayland.h" |
|
|
|
|
|
|
|
|
|
#include "abstract_client.h" |
|
|
|
|
@ -92,29 +91,9 @@ bool DataBridge::filterEvent(xcb_generic_event_t *event) |
|
|
|
|
if (m_dnd && m_dnd->filterEvent(event)) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
if (event->response_type == Xcb::Extensions::self()->fixesSelectionNotifyEvent()) { |
|
|
|
|
return handleXfixesNotify((xcb_xfixes_selection_notify_event_t *)event); |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool DataBridge::handleXfixesNotify(xcb_xfixes_selection_notify_event_t *event) |
|
|
|
|
{ |
|
|
|
|
Selection *selection = nullptr; |
|
|
|
|
|
|
|
|
|
if (event->selection == atoms->clipboard) { |
|
|
|
|
selection = m_clipboard; |
|
|
|
|
} else if (event->selection == atoms->xdnd_selection) { |
|
|
|
|
selection = m_dnd; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!selection) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return selection->handleXfixesNotify(event); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
DragEventReply DataBridge::dragMoveFilter(Toplevel *target, const QPoint &pos) |
|
|
|
|
{ |
|
|
|
|
if (!m_dnd) { |
|
|
|
|
|