protocols: implement ext-data-control (#11323)
This protocol has superseded wlr-data-control
This commit is contained in:
parent
60d769a899
commit
aaedce596e
6 changed files with 453 additions and 0 deletions
|
|
@ -63,6 +63,7 @@
|
|||
#include "../protocols/XDGTag.hpp"
|
||||
#include "../protocols/XDGBell.hpp"
|
||||
#include "../protocols/ExtWorkspace.hpp"
|
||||
#include "../protocols/ExtDataDevice.hpp"
|
||||
|
||||
#include "../helpers/Monitor.hpp"
|
||||
#include "../render/Renderer.hpp"
|
||||
|
|
@ -190,6 +191,7 @@ CProtocolManager::CProtocolManager() {
|
|||
PROTO::xdgTag = makeUnique<CXDGToplevelTagProtocol>(&xdg_toplevel_tag_manager_v1_interface, 1, "XDGTag");
|
||||
PROTO::xdgBell = makeUnique<CXDGSystemBellProtocol>(&xdg_system_bell_v1_interface, 1, "XDGBell");
|
||||
PROTO::extWorkspace = makeUnique<CExtWorkspaceProtocol>(&ext_workspace_manager_v1_interface, 1, "ExtWorkspace");
|
||||
PROTO::extDataDevice = makeUnique<CExtDataDeviceProtocol>(&ext_data_control_manager_v1_interface, 1, "ExtDataDevice");
|
||||
|
||||
if (*PENABLECM)
|
||||
PROTO::colorManagement = makeUnique<CColorManagementProtocol>(&wp_color_manager_v1_interface, 1, "ColorManagement", *PDEBUGCM);
|
||||
|
|
@ -292,6 +294,7 @@ CProtocolManager::~CProtocolManager() {
|
|||
PROTO::xdgTag.reset();
|
||||
PROTO::xdgBell.reset();
|
||||
PROTO::extWorkspace.reset();
|
||||
PROTO::extDataDevice.reset();
|
||||
|
||||
for (auto& [_, lease] : PROTO::lease) {
|
||||
lease.reset();
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "../protocols/core/Seat.hpp"
|
||||
#include "../protocols/core/DataDevice.hpp"
|
||||
#include "../protocols/DataDeviceWlr.hpp"
|
||||
#include "../protocols/ExtDataDevice.hpp"
|
||||
#include "../protocols/PrimarySelection.hpp"
|
||||
#include "../protocols/core/Compositor.hpp"
|
||||
#include "../Compositor.hpp"
|
||||
|
|
@ -578,6 +579,7 @@ void CSeatManager::setCurrentSelection(SP<IDataSource> source) {
|
|||
m_selection.destroySelection = source->m_events.destroy.listen([this] { setCurrentSelection(nullptr); });
|
||||
PROTO::data->setSelection(source);
|
||||
PROTO::dataWlr->setSelection(source, false);
|
||||
PROTO::extDataDevice->setSelection(source, false);
|
||||
}
|
||||
|
||||
m_events.setSelection.emit();
|
||||
|
|
@ -603,6 +605,7 @@ void CSeatManager::setCurrentPrimarySelection(SP<IDataSource> source) {
|
|||
m_selection.destroyPrimarySelection = source->m_events.destroy.listen([this] { setCurrentPrimarySelection(nullptr); });
|
||||
PROTO::primarySelection->setSelection(source);
|
||||
PROTO::dataWlr->setSelection(source, true);
|
||||
PROTO::extDataDevice->setSelection(source, true);
|
||||
}
|
||||
|
||||
m_events.setPrimarySelection.emit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue