1
0
Fork 0
forked from wry/wry

Merge pull request #753 from mahkoh/jorth/globals-simple-names

globals: use real interface names for singletons map
This commit is contained in:
mahkoh 2026-02-22 00:43:10 +01:00 committed by GitHub
commit 05476d68f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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