Skip to content

Comments

fix(wayland): decoration not clickable when initial visible is false#1055

Open
yuezk wants to merge 1 commit intotauri-apps:devfrom
yuezk:fix_cannt_close_wayland
Open

fix(wayland): decoration not clickable when initial visible is false#1055
yuezk wants to merge 1 commit intotauri-apps:devfrom
yuezk:fix_cannt_close_wayland

Conversation

@yuezk
Copy link

@yuezk yuezk commented Feb 9, 2025

Problem

The decoration is not clickable if the window initial visible is false.

Reproduce

  1. Run the following code
  2. The close button, the maximum button, and the minimum button is not clickable.
use tao::{
  event::{Event, WindowEvent},
  event_loop::{ControlFlow, EventLoop},
  window::WindowBuilder,
};

#[allow(clippy::single_match)]
fn main() {
  env_logger::init();
  let event_loop = EventLoop::new();

  let window = WindowBuilder::new()
    .with_visible(false)
    .with_title("A fantastic window!")
    .build(&event_loop)
    .unwrap();

  window.set_visible(true);

  event_loop.run(move |event, _, control_flow| {
    *control_flow = ControlFlow::Wait;

    match event {
      Event::WindowEvent {
        event: WindowEvent::CloseRequested,
        ..
      } => *control_flow = ControlFlow::Exit,
      _ => (),
    }
  });
}

Solution

Avoid setting the above child property of the EventBox. The default value is false. Seems there is no need to set it to true.

https://docs.gtk.org/gtk3/method.EventBox.set_above_child.html

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2025

Package Changes Through 6f278c7

There are 1 changes which include tao with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tao 0.31.1 0.32.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@yuriyhanysh
Copy link

I can reproduce this bug on Fedora (KDE Plasma 6.5.5, Wayland) in cjpais/Handy app.
Can confirm the fix resolves the issue.

How can we merge it?

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