Skip to content

Attach dialog to window#384

Open
feschber wants to merge 3 commits intomainfrom
attach-dialog-to-window
Open

Attach dialog to window#384
feschber wants to merge 3 commits intomainfrom
attach-dialog-to-window

Conversation

@feschber
Copy link
Copy Markdown
Owner

This puts the dialog for input-capture on top of the main lan-mouse window.

pending: VecDeque<(CaptureHandle, CaptureEvent)>,
}

#[derive(Clone, Debug)]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a type similar to this in ashpd, named WindowIdentifierType. Maybe we can make it public, currently it is behind a backend feature

X11(u32),
}

impl Into<ashpd::WindowIdentifier> for WindowIdentifier {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then this impl can go into ashpd itself


// export TopLevel handle and send it to the service so that it can put the InpuCapture / RemoteDesktop
// windows on top of it using xdg-foreign.
window.connect_show(|window| {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a gtk feature for this, why not make use of it?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that possible? How do I get the handle from the GtkWindowIdentifier for serialization?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It implements Serialize/ToString but you will have to keep a ref to the ashpd type till the dialog is closed to not unexport the handle

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case I guess it would make sense to change bilelmoussaoui/ashpd#352 to take in the entire "wayland:{handle}" string?

Copy link
Copy Markdown
Owner Author

@feschber feschber Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to not unexport the handle

I should probably do that as well

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case I guess it would make sense to change bilelmoussaoui/ashpd#352 to take in the entire "wayland:{handle}" string?

Not if you make WindowIdentifierType public and you write a From trait impl for it.

@feschber feschber force-pushed the attach-dialog-to-window branch 2 times, most recently from 72f4fa1 to a5bdcd0 Compare February 13, 2026 12:17
@feschber feschber force-pushed the attach-dialog-to-window branch from a5bdcd0 to 9d4abb1 Compare February 24, 2026 11:58
@feschber feschber force-pushed the attach-dialog-to-window branch from 9d4abb1 to a9d76af Compare February 24, 2026 12:37
@feschber feschber force-pushed the attach-dialog-to-window branch from a9d76af to c5d2b3c Compare February 24, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants