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

Unexpected titlebar behavior on Ubuntu 22.04 #264

Open
IAmSegfault opened this issue Apr 25, 2022 · 1 comment
Open

Unexpected titlebar behavior on Ubuntu 22.04 #264

IAmSegfault opened this issue Apr 25, 2022 · 1 comment

Comments

@IAmSegfault
Copy link

I ran into some strange behavior on a fresh install of Ubuntu 22.04.
As you can see from the image, the titlebar decoration does not use the
system default decoration and the title name is not displayed even with the following code:

let mut console = rltk::RltkBuilder::simple(width, height)
            .ok()
            .unwrap()
            .with_title("Rustrl")
            .with_dimensions(width, height)
            .with_tile_dimensions(16, 16)
            .with_advanced_input(true)
            .with_font(term, 8, 8)
            .with_font(vga, 8, 16)
            .with_font(rogueyun, 16, 16)
            .with_font(rogueyunggfx, 16, 16)
            .with_simple_console(width, height, rogueyun) // Tile layer
            .with_sparse_console(width, height, rogueyun) // Feature layer
            .with_sparse_console(width, height, rogueyun) // Item layer
            .with_fancy_console(width, height, rogueyun) // Effect layer
            .with_fancy_console(width, height, rogueyun) // Creature layer
            .with_fancy_console(width, height, rogueyun) // Projectile layer
            .with_fancy_console(width, height, rogueyun) // Gui layer
            .build()
            .ok()
            .unwrap();

Screenshot from 2022-04-25 01-16-28

I'm assuming that this has to do with the way Bracket-lib is working with a dependency like winit.
I was not able to reproduce the issue on another machine running Ubuntu 20.04.
In addition when running the executable either directly or from a rustrl.desktop file, the name of the application that shows on the top bar says "unknown".
I'm not sure if this is somehow related to the first issue of the name not appearing in the titlebar.

@IAmSegfault
Copy link
Author

After a little further investigation, it looks like this is an issue with winit.
Ubuntu 22.04 defaults to using wayland and most likely winit has not been
updated to work with it 100%.
This looks like it could be used as a temporary workaround.

You can force xwayland usage with env var WINIT_UNIX_BACKEND=x11, see docs.
#rust-windowing/winit/issues/1967

Is this something that would need to be done with Bracket-lib's cargo.toml or mine?

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

No branches or pull requests

1 participant