-
Notifications
You must be signed in to change notification settings - Fork 19
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
Window focus function not recovered once Popup Toolkit close #192
Comments
Can you share the code for your popup please? This doesn't feel like it should be a qtile-extras issue as the popup is just a window and so should be managed by qtile like any other window. |
Sure ! def show_power_menu(qtile):
controls = [
PopupImage(
filename="~/.config/qtile/assets/lock.svg",
pos_x=0,
pos_y=0.02,
width=1.0,
height=0.15,
highlight_method='image',
highlight_filename="~/.config/qtile/assets/lock_blur.svg",
mouse_callbacks={"Button1": lazy.spawn('betterlockscreen -l dim -- --time-str="%H:%M"')}
),
PopupText(
text="Lock",
font='monospace Bold',
fontsize=18,
pos_x=0,
pos_y=0.17,
width=1,
height=0.075,
foreground=colors[15],
h_align="center",
can_focus=False,
mouse_callbacks={"Button1": lazy.spawn('betterlockscreen -l dim -- --time-str="%H:%M"')}
),
PopupImage(
filename="~/.config/qtile/assets/logout.svg",
pos_x=0.0,
pos_y=0.27,
width=1.0,
height=0.15,
highlight_method='image',
highlight_filename="~/.config/qtile/assets/logout_blur.svg",
mouse_callbacks={"Button1": lazy.shutdown()}
),
PopupText(
text="Logout",
font='monospace Bold',
fontsize=18,
pos_x=0.0,
pos_y=0.42,
width=1.0,
height=0.075,
foreground=colors[10],
h_align="center",
can_focus=False,
mouse_callbacks={"Button1": lazy.shutdown()}
),
PopupImage(
filename="~/.config/qtile/assets/restart.svg",
pos_x=0.0,
pos_y=0.52,
width=1.0,
height=0.15,
highlight_method='image',
highlight_filename="~/.config/qtile/assets/restart_blur.svg",
mouse_callbacks={"Button1": lazy.spawn("systemctl reboot")}
),
PopupText(
text="Restart",
font='monospace Bold',
fontsize=18,
pos_x=0,
pos_y=0.67,
width=1,
height=0.075,
foreground=colors[12],
h_align="center",
can_focus=False,
mouse_callbacks={"Button1": lazy.spawn("systemctl reboot")}
),
PopupImage(
filename="~/.config/qtile/assets/shutdown.svg",
pos_x=0,
pos_y=0.77,
width=1.0,
height=0.15,
highlight_method='image',
highlight_filename="~/.config/qtile/assets/shutdown_blur.svg",
mouse_callbacks={"Button1": lazy.spawn("systemctl poweroff")}
),
PopupText(
text="Shutdown",
font='monospace Bold',
fontsize=18,
pos_x=0,
pos_y=0.92,
width=1,
height=0.075,
foreground=colors[13],
h_align="center",
can_focus=False,
mouse_callbacks={"Button1": lazy.spawn("systemctl poweroff")}
),
]
layout = PopupRelativeLayout(
qtile,
width=100,
height=350,
border_width=1,
border=colors[6],
controls=controls,
background=colors[1],
initial_focus=None,
hide_interval=0.7,
hide_on_mouse_leave=True
)
layout.show(x=-6, y=0.003, warp_pointer=False,relative_to=3,relative_to_bar=True) |
Thanks. I'm pretty confident this is a qtile issue as there have been some issues with focusing windows when others close. No need to open a separate issue though. |
I'm using picom as compositor. I found in the configuration file this part:
I didn't find any difference between |
Not properly - see qtile/qtile#3910 |
A bit more investigation on this. Running xprop on both application i can see some difference notably with I'm wondering if the additional |
The window sitting just underneath the Popup Toolkit cannot be focused directly after Popup Toolkit closes:
follow_mouse_focus=True
doesn't workHere's a video illustration with two windows and a popuptoolkit
2022-11-18.10-39-15.mp4
The text was updated successfully, but these errors were encountered: