1
0
Fork 0
forked from wry/wry

globals: use real interface names for singletons map

This commit is contained in:
Julian Orth 2026-02-22 00:40:18 +01:00
parent e7b67b68b0
commit 1f1bca92d4

View file

@ -162,7 +162,9 @@ macro_rules! singletons {
fn add_singletons(globals: &mut Globals) {
$(
let name = globals.name();
globals.add_global_no_broadcast(&Rc::new($name::new(name)));
with_builtin_macros::with_eager_expansions! {
globals.add_global_no_broadcast(&Rc::new(#{concat_idents!($name, Global)}::new(name)));
}
globals.singletons[Singleton::$name] = name;
)*
}
@ -170,65 +172,65 @@ macro_rules! singletons {
}
singletons! {
WlCompositorGlobal,
WlShmGlobal,
WlSubcompositorGlobal,
XdgWmBaseGlobal,
WlDataDeviceManagerGlobal,
ZxdgDecorationManagerV1Global,
OrgKdeKwinServerDecorationManagerGlobal,
ZwpPrimarySelectionDeviceManagerV1Global,
ZwlrLayerShellV1Global,
ZwlrOutputManagerV1Global,
ZxdgOutputManagerV1Global,
JayCompositorGlobal,
ZwlrScreencopyManagerV1Global,
ZwpRelativePointerManagerV1Global,
ExtSessionLockManagerV1Global,
WpViewporterGlobal,
WpFractionalScaleManagerV1Global,
ZwpPointerConstraintsV1Global,
XwaylandShellV1Global,
WpTearingControlManagerV1Global,
WpSinglePixelBufferManagerV1Global,
WpCursorShapeManagerV1Global,
WpContentTypeManagerV1Global,
XdgActivationV1Global,
ExtForeignToplevelListV1Global,
ZwpIdleInhibitManagerV1Global,
ExtIdleNotifierV1Global,
XdgToplevelDragManagerV1Global,
ZwlrForeignToplevelManagerV1Global,
ZwlrDataControlManagerV1Global,
WpAlphaModifierV1Global,
ZwpVirtualKeyboardManagerV1Global,
ZwpInputMethodManagerV2Global,
ZwpTextInputManagerV3Global,
WpSecurityContextManagerV1Global,
XdgWmDialogV1Global,
ExtTransientSeatManagerV1Global,
ZwpPointerGesturesV1Global,
ZwpTabletManagerV2Global,
JayDamageTrackingGlobal,
ExtOutputImageCaptureSourceManagerV1Global,
ExtForeignToplevelImageCaptureSourceManagerV1Global,
ExtImageCopyCaptureManagerV1Global,
WpFifoManagerV1Global,
WpCommitTimingManagerV1Global,
ExtDataControlManagerV1Global,
WlFixesGlobal,
ExtWorkspaceManagerV1Global,
WpColorManagerV1Global,
XdgToplevelTagManagerV1Global,
JayHeadManagerV1Global,
WpPointerWarpV1Global,
JayPopupExtManagerV1Global,
ZwlrGammaControlManagerV1Global,
WpColorRepresentationManagerV1Global,
WlDrmGlobal,
ZwpLinuxDmabufV1Global,
WpLinuxDrmSyncobjManagerV1Global,
WpPresentationGlobal,
WlCompositor,
WlShm,
WlSubcompositor,
XdgWmBase,
WlDataDeviceManager,
ZxdgDecorationManagerV1,
OrgKdeKwinServerDecorationManager,
ZwpPrimarySelectionDeviceManagerV1,
ZwlrLayerShellV1,
ZwlrOutputManagerV1,
ZxdgOutputManagerV1,
JayCompositor,
ZwlrScreencopyManagerV1,
ZwpRelativePointerManagerV1,
ExtSessionLockManagerV1,
WpViewporter,
WpFractionalScaleManagerV1,
ZwpPointerConstraintsV1,
XwaylandShellV1,
WpTearingControlManagerV1,
WpSinglePixelBufferManagerV1,
WpCursorShapeManagerV1,
WpContentTypeManagerV1,
XdgActivationV1,
ExtForeignToplevelListV1,
ZwpIdleInhibitManagerV1,
ExtIdleNotifierV1,
XdgToplevelDragManagerV1,
ZwlrForeignToplevelManagerV1,
ZwlrDataControlManagerV1,
WpAlphaModifierV1,
ZwpVirtualKeyboardManagerV1,
ZwpInputMethodManagerV2,
ZwpTextInputManagerV3,
WpSecurityContextManagerV1,
XdgWmDialogV1,
ExtTransientSeatManagerV1,
ZwpPointerGesturesV1,
ZwpTabletManagerV2,
JayDamageTracking,
ExtOutputImageCaptureSourceManagerV1,
ExtForeignToplevelImageCaptureSourceManagerV1,
ExtImageCopyCaptureManagerV1,
WpFifoManagerV1,
WpCommitTimingManagerV1,
ExtDataControlManagerV1,
WlFixes,
ExtWorkspaceManagerV1,
WpColorManagerV1,
XdgToplevelTagManagerV1,
JayHeadManagerV1,
WpPointerWarpV1,
JayPopupExtManagerV1,
ZwlrGammaControlManagerV1,
WpColorRepresentationManagerV1,
WlDrm,
ZwpLinuxDmabufV1,
WpLinuxDrmSyncobjManagerV1,
WpPresentation,
}
pub struct Globals {