Repository navigation
wlr: expose layer surface state, configuration, iteration and keyboard focus clearing - #12
Merged
Merged
Conversation
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.
Plain bindings that kawa needs to support wlr-layer-shell clients in DeedleFake/kawa#17, such as panels, wallpapers, notifications and launchers. Right now kawa panics with
Not implemented.as soon as one connects. Each commit wraps wlroots calls, fields and events with nothing added on top.LayerSurfaceV1.Output,SetOutput,Namespace,Initialized,InitialCommit,CurrentandPendingread the matchingwlr_layer_surface_v1fields, andoutputcan be written. A client may leave the output nil, and the compositor then has to pick one before the surface is configured.LayerSurfaceV1Statereadswlr_layer_surface_v1_state:committed,anchor,exclusive_zone, the four margins,keyboard_interactive,desired_width,desired_heightandlayer. The anchor, keyboard interactivity and committed field constants come with it. kawa lays surfaces out from this state and re-arranges whencommittedis non-zero.LayerSurfaceV1.Configure,Destroy,ExclusiveEdgeandOnDestroywrapwlr_layer_surface_v1_configure,wlr_layer_surface_v1_destroy,wlr_layer_surface_v1_get_exclusive_edgeand thedestroyevent. kawa configures each surface with its arranged size, takes exclusive zones off the edge wlroots reports, and closes surfaces when their output goes away.LayerSurfaceV1.ForEachSurface,Surfaces,ForEachPopupSurface,PopupSurfacesandPopupSurfaceAtwrapwlr_layer_surface_v1_for_each_surface,wlr_layer_surface_v1_for_each_popup_surfaceandwlr_layer_surface_v1_popup_surface_at, in the same shape as the existingXDGSurfaceiterators. kawa uses them to draw a surface with its subsurfaces, to draw and hit test its popups above everything else, and to find the layer surface that a popup belongs to.Seat.KeyboardNotifyClearFocuswrapswlr_seat_keyboard_notify_clear_focus. When a launcher that held the keyboard closes and there's no window left to give it to, kawa clears keyboard focus.Verified with
go build ./...andgo vet ./...against wlroots 0.20.2, and by running kawa built against this branch in a nested session with swaybg, waybar (including its GTK menus and tooltips), mako, fuzzel and a gtk-layer-shell test panel on one and two outputs.