Meconopsis changes for Wayland and general refactoring/optimizations

This commit is contained in:
Kevin Alberts 2024-02-08 18:59:30 +01:00
parent 1e65025045
commit 2860100089
9 changed files with 697 additions and 1185 deletions

View file

@ -32,29 +32,25 @@ class KuroFloating(Floating):
# 'sun-awt-X11-XWindowPeer' is a dropdown used in Java application,
# don't reposition it anywhere, let Java app to control it
cls = client.window.get_wm_class() or ''
is_java_dropdown = 'sun-awt-X11-XWindowPeer' in cls
cls = client.get_wm_class() or ""
is_java_dropdown = "sun-awt-X11-XWindowPeer" in cls
if is_java_dropdown:
client.paint_borders(bc, bw)
client.cmd_bring_to_front()
client.bring_to_front()
# alternatively, users may have asked us explicitly to leave the client alone
elif any(m.compare(client) for m in self.no_reposition_rules):
client.paint_borders(bc, bw)
client.cmd_bring_to_front()
client.bring_to_front()
else:
above = False
# We definitely have a screen here, so let's be sure we'll float on screen
try:
client.float_x
client.float_y
except AttributeError:
if client.float_x is None or client.float_y is None:
# this window hasn't been placed before, let's put it in a sensible spot
above = self.compute_client_position(client, screen_rect)
client.place(
client.x,
client.y,
@ -63,5 +59,6 @@ class KuroFloating(Floating):
bw,
bc,
above,
respect_hints=True,
)
client.unhide()