Match the declarations to GNOME Shell 51 - #147
Open
JumpLink wants to merge 2 commits into
Open
Conversation
JumpLink
force-pushed
the
fix/gnome-51-api-drift
branch
from
August 29, 2026 06:55
3777bff to
755b6ff
Compare
JumpLink
force-pushed
the
fix/gnome-51-api-drift
branch
from
August 29, 2026 07:02
755b6ff to
42c3493
Compare
GNOME 51 moves event handling off actor vfuncs and onto Clutter actions,
gestures and key binding pools. The shell classes stopped overriding
`vfunc_*_event` and grew signal handlers instead. Those vfuncs still
exist on `Clutter.Actor`, so nothing fails to compile. The declarations
just stopped describing the shell.
Checked against gnome-shell at tag 51.beta, module by module, for every
declared name that changed between 50.4 and 51.beta:
appDisplay BaseAppView/AppDisplay._onScroll now takes the
ScrollController signal arguments; _onKeyPressEvent is a
binding pool closure
boxpointer _muteKeys is a KeyController, _muteInput a ClickGesture
calendar vfunc_scroll_event -> _onScroll
dialog vfunc_event -> KeyController
layout HotCorner.vfunc_leave_event is gone
messageList URLHighlighter motion/leave -> MotionController;
Message.vfunc_key_press_event -> _closeIfAllowed
messageTray _onNotificationKeyRelease -> binding pool
modalDialog vfunc_captured_event is gone
search new exported SearchEntry with activate-new-instance
slider scroll/key vfuncs -> _onScroll, _moveLeft, _moveRight
backlight SliderItem forwards vfunc_navigate_focus
volume _handleScrollEvent -> _onScroll + _handleScroll
switcherPopup key/scroll vfuncs -> _onKeyPress, _onModifierChange,
_onScroll
userWidget new showAvatar/hideAvatar
Everything added here carries `@version 51`, including the handlers
whose arguments 51 reshaped.
Checking these modules against 51.beta turned up a second group. These
names are absent at 50.4 as well, so gnome-shell dropped them in an
earlier cycle and they describe an API no supported shell has.
appFavorites _onFavsChanged
calendar _dndSwitch, _dndButton and the DoNotDisturbSwitch class
behind them (the switch moved to quick settings)
layout HotCorner._entered, _onCornerEntered, _onCornerLeft,
_setupFallbackCornerIfNeeded, _pendingLoadBackground
messageList URLHighlighter button press/release vfuncs,
NotificationMessage._getIcon/_onUpdated,
MediaMessage._secondaryBin/_closeButton
messageTray _onNotificationShow
popupMenu _motionEvent, _touchDragging
search _onPan
slider button press/release and touch vfuncs, startDragging,
_endDragging, _motionEvent, scroll
switcherPopup vfunc_button_press_event
Slider gains `step(nSteps)` in the same pass. It replaced
`scroll(event)`, `status/volume` calls it, and it was never declared. It
predates 51, so it carries no `@version` tag.
Only modules that GNOME 51 touched are in scope here. The rest of the
package has more of this; the PR description lists it.
JumpLink
force-pushed
the
fix/gnome-51-api-drift
branch
from
August 29, 2026 07:05
42c3493 to
9cf89c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GNOME 51 moved event handling off actor vfuncs and onto
Clutteractions, gestures and key binding pools. The shell classes stopped overridingvfunc_*_eventand grew signal handlers instead. Those vfuncs still exist onClutter.Actor, so nothing fails to compile. The declarations just stopped describing the shell, quietly.Stacked on #145, which is stacked on #144. Merge those first and this diff is only the two commits below.
First commit, sync with 51
Checked module by module against gnome-shell at tag
51.beta, for every declared name that changed between50.4and51.beta.appDisplayBaseAppView/AppDisplay._onScrollnow takes theScrollController::scrollarguments, and_onKeyPressEventbecame a binding pool closureboxpointer_muteKeysis aClutter.KeyControllerand_muteInputaClutter.ClickGesture, both werebooleancalendarvfunc_scroll_eventbecame_onScrolldialogvfunc_eventbecame aKeyControllerlayoutHotCorner.vfunc_leave_eventis gonemessageListURLHighlightermotion and leave became aMotionController,Message.vfunc_key_press_eventbecame_closeIfAllowedmessageTray_onNotificationKeyReleasebecame a binding pool closuremodalDialogvfunc_captured_eventis gonesearchSearchEntry, with itsactivate-new-instancesignalslider_onScroll,_moveLeft,_moveRightstatus/backlightSliderItemforwardsvfunc_navigate_focusto the sliderstatus/volume_handleScrollEventbecame_onScrollplus_handleScrollswitcherPopup_onKeyPress,_onModifierChange,_onScrolluserWidgetshowAvatarandhideAvatarEverything added carries
@version 51, per the convention. I applied it to the handlers whose arguments 51 reshaped as well,appDisplay._onScrollfor one, since the declared contract is the 51 one. Trim those if you read the tag more strictly.Two additions I left out, because those classes declare no members at all and one more private helper would not help anyone.
ActivitiesButton._toggleActioninpanel, declared asclass ActivitiesButton extends Button {}, andWindowPreview._onEnter/_onLeaveinwindowPreview, which declares exactly two members.Second commit, names 51 did not remove but an earlier release did
Checking those modules turned up a second group, absent at
50.4as well. They describe an API no supported shell has. Same files, so the same PR, but a separate commit, because it is a different claim and you may want to judge it separately.slideris the worst of them.startDragging,_endDragging,_motionEvent,scrolland three vfuncs all went away when the pan gesture landed, andstep(nSteps), the methodstatus/volumeactually calls, was never declared. That one I added. It predates 51, so it carries no@versiontag.What is still wrong after this PR
The same check across the whole package still reports 37 stale member declarations in 12 files. All of them are in modules GNOME 51 did not touch, so they are outside this PR's scope, but they are the same defect.
misc/systemActions:_loginManagerui/animation:_animationsLoaded,_init,_loadFile,_onDestroy,_showFrame,_syncAnimationSize,_updateui/closeDialog:_onFocusChanged,_trackedui/components:_sessionUpdatedui/dnd:_dragState,_eventIsRelease,_grabActor,_grabDevice,_maybeStartDrag,_onButtonPress,_onTouchEvent,_ungrabActor,_ungrabDeviceui/iconGrid:_childAdded,_childRemovedui/messageList:_closeButton,_getIcon,_onUpdated,_secondaryBinui/status/accessibility:_buildItemExtendedui/status/brightness:_changeSlider,_proxy,_sliderChanged,_sliderChangedIdui/status/network:_closeConnectivityCheck,_flushConnectivityQueue,_portalHelperDoneui/status/remoteAccess:vfunc_eventui/status/thunderbolt:_ensureSource,_sourceui/animationis the striking one.Spinneruses aconstructornow, and theAnimationbase class the declaration describes is not injs/ui/animation.jsat all any more.There is a stale export too.
search.d.tsexportsMaxWidthBox, which upstream has kept module-private since at least 50.4. Removing an export breaks consumers, so I left it alone.The part worth automating
I found all of this with a throwaway script. Parse the declared members out of each
.d.ts, parse the defined names out of the matchingjs/file at a given tag, print the difference. It found the 51 drift and the older drift in one run, and it is the only reason this PR is a list rather than a guess.It could live in the repo as
scripts/check-shell-api.mjs, run against a shallowgit clone --depth 1 --branch <tag>of gnome-shell, so each cycle starts from a diff instead of from whatever the compiler happens to notice. It cannot be a required check until the 37 above are dealt with, but it can run and report. Say the word and I will send it.One caveat, so nobody over-trusts it. It matches names, not shapes. It cannot see a method whose signature changed, and it has false positives around static class fields.
_mediaSourceinmessageListwas one, astatic _mediaSource = …, which I checked and kept. Every removal in this PR I verified by reading the upstream source, not by trusting the script.Validation
build:types,prettier:check,validate:types,build:exampleandvalidate:exampleall pass locally.