Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make WindowAdaptor::request_redraw public #2874

Merged
merged 1 commit into from Jun 13, 2023
Merged

Make WindowAdaptor::request_redraw public #2874

merged 1 commit into from Jun 13, 2023

Conversation

ogoffart
Copy link
Member

No description provided.

@ogoffart ogoffart requested a review from tronical June 13, 2023 16:05
@@ -16,7 +16,6 @@ use i_slint_core::{
platform::PlatformError,
renderer::RendererSealed,
software_renderer::{LineBufferProvider, MinimalSoftwareWindow},
window::WindowAdapterInternal,
Copy link
Member Author

Choose a reason for hiding this comment

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

Because now, the call to request_redraw() no longer use the one from WindowAdapterInternal but use the one from the Window through Deref

@@ -538,10 +540,10 @@ impl WindowInner {
/// Sets the focus to the item pointed to by item_ptr. This will remove the focus from any
/// currently focused item.
pub fn set_focus_item(&self, focus_item: &ItemRc) {
let old = self.take_focus_item();
let new = self.move_focus(focus_item.clone(), next_focus_item);
Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed this bug because now MinimalSoftwareWindow no longer implements WindowAdapterInternal. So the screenshot test wouldn't render the cursor on the line edit since it no longer had the focus.

Copy link
Member

Choose a reason for hiding this comment

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

Yay for the screenshot tests:)

@ogoffart ogoffart merged commit 4dd10f4 into master Jun 13, 2023
26 checks passed
@ogoffart ogoffart deleted the olivier/window branch June 13, 2023 18:29
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.

None yet

2 participants