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

incorrect window placement when using multiple monitors w/ i3 #496

Open
MyriaCore opened this issue Aug 30, 2020 · 12 comments
Open

incorrect window placement when using multiple monitors w/ i3 #496

MyriaCore opened this issue Aug 30, 2020 · 12 comments

Comments

@MyriaCore
Copy link
Contributor

MyriaCore commented Aug 30, 2020

Describe the bug
When using multiple monitors w/ i3, taffybar spawns all the windows on a single monitor, instead of spawning one window on each.

To Reproduce
Steps to reproduce the behavior:

  1. Install & create a minimal setup with i3.
  2. Plug in a second monitor
  3. Launch taffybar
  4. See error

Expected behavior
A single taffybar window should be created on each system.

Screenshots

with 2 monitors:

image

Version information
Taffybar version (or git sha if building from source): taffybar 3.2.2
Installation method (nix/stack/cabal/arch packages): stack
Gtk version: 1:3.24-22-1 (gtk3, basically)


I suspect that this might have to do with i3 not fully conforming to ewmh or something, since it appears that this feature is already supported. I don't think it's something funkey with my build of taffybar, but it totally could be.

@colonelpanic8
Copy link
Member

The code that controls this stuff lives in gtk-strut: https://github.com/IvanMalison/gtk-strut/blob/84a96d51ff4a50675789ed0954836f6ab81b0d27/src/Graphics/UI/GIGtkStrut.hs#L78

You can consistently reproduce this

@starcraft66
Copy link

starcraft66 commented Feb 16, 2023

I can consistently reproduce this on i3 using taffybar from nixpkgs unstable. Any chance you could look into getting this fixed? I'd love to contribute but I've never written any Haskell before. I'd love to use taffybar but it's not usable for me in this state.

@colonelpanic8
Copy link
Member

@starcraft66 can you enable verbose logging and then start taffybar and post the output here

@starcraft66
Copy link

Sure, I'm not sure which log level "verbose" is but I ran it with "DEBUG" log level: http://ix.io/4ohC

@starcraft66
Copy link

Any chance this could be looked at?

@colonelpanic8
Copy link
Member

@starcraft66 its likely that this function:

is failing for some reason in your setup

@colonelpanic8
Copy link
Member

sorry, not that one, but

this one:

getMonitorCount :: IO Int

@colonelpanic8
Copy link
Member

Nevermind, that doesn't make sense either.

This is extremely strange:

�[92m[DEBUG]�[0m �[92mSystem.Taffybar.Context�[0m - newWindows: [StrutConfig {strutWidth = ScreenRatio (1 % 1), strutHeight = ExactSize 50, strutXPadding = 10, strutYPadding = 10, strutMonitor = Just 0, strutPosition = TopPos, strutAlignment = Center, strutDisplayName = Nothing},StrutConfig {strutWidth = ScreenRatio (1 % 1), strutHeight = ExactSize 50, strutXPadding = 10, strutYPadding = 10, strutMonitor = Just 1, strutPosition = TopPos, strutAlignment = Center, strutDisplayName = Nothing}]
�[92m[DEBUG]�[0m �[92mSystem.Taffybar.Context�[0m - barConfigs: [StrutConfig {strutWidth = ScreenRatio (1 % 1), strutHeight = ExactSize 50, strutXPadding = 10, strutYPadding = 10, strutMonitor = Just 0, strutPosition = TopPos, strutAlignment = Center, strutDisplayName = Nothing},StrutConfig {strutWidth = ScreenRatio (1 % 1), strutHeight = ExactSize 50, strutXPadding = 10, strutYPadding = 10, strutMonitor = Just 1, strutPosition = TopPos, strutAlignment = Center, strutDisplayName = Nothing}]

why are there two bars with strutMonitor = 0?

are you using useAllMonitors?

@starcraft66
Copy link

@IvanMalison I'm not sure what useAllMonitors is, I don't have a configuration file and am simply running nix run 'nixpkgs#taffybar'

@colonelpanic8
Copy link
Member

@IvanMalison I'm not sure what useAllMonitors is, I don't have a configuration file and am simply running nix run 'nixpkgs#taffybar'

You mean you're not using a configuration file?

@starcraft66
Copy link

I'm not familiar with the way taffybar is configured but no, I do not have a configuration. I just launched it to give it a spin with what I presume is the default configuration. Should I be taking additional steps?

@colonelpanic8
Copy link
Member

I'm not familiar with the way taffybar is configured but no, I do not have a configuration. I just launched it to give it a spin with what I presume is the default configuration. Should I be taking additional steps?

Well then you're probably using the default configuration here:

which uses useAllMonitors by default

{ monitorsAction = useAllMonitors

the issue is as @MyriaCore mentioned, likely related to noncomformity of i3:

I suspect that this might have to do with i3 not fully conforming to ewmh or something, since it appears that this feature is already supported. I don't think it's something funkey with my build of taffybar, but it totally could be.

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

3 participants