Giter VIP home page Giter VIP logo

Comments (11)

eater avatar eater commented on August 25, 2024

Correction: when the mouse pointer is on the first display when I invoke Alttab, the switcher appears correctly, right in the middle of that monitor. When the mouse pointer is on the second display, though, the switcher appears straddling the two monitors.

from alttab.

sagb avatar sagb commented on August 25, 2024

Thank you for reporting this.
Could you perform any of the following?

  1. Update to latest master, run alttab like

alttab -v 2>&1 | grep "uiwin "

and post the output here.

  1. (probably hard) Find an example program with expected behaviour, i.e. any window positioned in the way which you expect from alttab, then run xprop for this window and post full output here.

technical notes

for centering in different WMs, alttab uses the following altogether:
explicit position/size hints,
_NET_WM_WINDOW_TYPE_DIALOG property,
WM_TRANSIENT_FOR hint,
USPosition/USSize hints,
PPosition/PSize hints.

from alttab.

eater avatar eater commented on August 25, 2024

OK. I upgraded to the latest master -- previously I had installed from AUR. Now in both displays, the switcher appears in the bottom right, not the center as before, and extends off the right edge.

  1. $ alttab -v 2>&1 | grep "uiwin "
    first display (1680 x 1050) :
no icon in WM hints ( alttab -v 2>&1 | grep "uiwin ")
0: c0f80d (lvl 0, icon 12814049 (512x512)):  alttab -v 2>&1 | grep "uiwin "
uiwin w=848 h=144, x=956 y=888, scr w=2760 h=1920, default was 0 now 0

second display (1920x1080):
uiwin w=728 h=144, x=1016 y=888, scr w=2760 h=1920, default was 0 now 0

  1. xprop
WM_CLIENT_MACHINE(STRING) = "falk"
_NET_WM_PID(CARDINAL) = 11563
_NET_STARTUP_ID(UTF8_STRING) = "i3/rofi/8985-62-falk_TIME330154383"
WM_CLASS(STRING) = "rofi", "Rofi"
WM_NAME(STRING) = "rofi"
_NET_WM_NAME(UTF8_STRING) = "rofi"
_NET_WM_STATE(ATOM) = _NET_WM_STATE_ABOVE

Let me know if I can do anything more to help -- I'd love to get this (and #48) working!

from alttab.

sagb avatar sagb commented on August 25, 2024

Please pull again and show:

alttab -vv 2>&1 | grep "uiwin "

(note two "v")

from alttab.

eater avatar eater commented on August 25, 2024

Pulled again. First display:

no icon in WM hints ( alttab -vv 2>&1 | grep "uiwin ")
[5]  alttab -vv 2>&1 | grep "uiwin "
[5]  alttab -vv 2>&1 | grep "uiwin "
5: c0f80d (lvl 0, icon 12814049 (512x512)):  alttab -vv 2>&1 | grep "uiwin "
uiwin 848x144 +956+888, 1 screen(s): [2760x1920] 

Second display:
uiwin 848x144 +956+888, 1 screen(s): [2760x1920]

from alttab.

sagb avatar sagb commented on August 25, 2024

1 screen(s): [2760x1920]

Unfortunately, alttab only sees this single combined screen (of ridiculous dimensions, is your second monitor rotated 90 degrees?), and behaves as expected.
Perhaps Xinerama or xRandr would be useful here, but this will complicate the code and bring new dependencies. Let's try one of the following instead:

  1. An option to disable centering at all. The switcher will be placed at the position where your WM usually places dialog windows.
  2. An option to explicitly specify coordinates of center of the switcher. This way, you may specify the single exact position like "the center of the first monitor".

Which option do you think is more suitable for you and perhaps other multi-monitor users?

from alttab.

sagb avatar sagb commented on August 25, 2024

I believe rofi does nothing on this matter, so it's equivalent to (1).

from alttab.

eater avatar eater commented on August 25, 2024

Haha, yes, just this morning I rotated the second monitor. I think option 1 should work well.

from alttab.

sagb avatar sagb commented on August 25, 2024

I've implemented both. Pull and try:

alttab -p none
alttab -p +100+100

from alttab.

eater avatar eater commented on August 25, 2024

Perfect! Both methods work. Because my two displays are different resolutions (and now different orientations as well) it's hard to find absolute coordinates that give a nice positioning depending on which display is focused, so I'm happiest with -p none.

from alttab.

sagb avatar sagb commented on August 25, 2024

eater, did you ever see such a clipping in your i3 multi-monitor configuration? #54, see screenshots.
Please comment there if you have any suggestions.

from alttab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.