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

Refactor window setup in gamescope sessions #153

Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d8f2460
umu_run: monitor baselayer and windows in separate threads
R1kaB3rN Jul 17, 2024
c5169eb
umu_run: refactor get_client_window_ids
R1kaB3rN Jul 17, 2024
0926cea
umu_run: refactor set_steam_game_property
R1kaB3rN Jul 17, 2024
03955a3
umu_run: refactor get_gamescope_baselayer_order
R1kaB3rN Jul 17, 2024
ca82a43
umu_run: refactor set_gamescope_baselayer_order
R1kaB3rN Jul 17, 2024
b10222c
umu_run: refactor window_setup
R1kaB3rN Jul 17, 2024
c696f73
umu_run: change identifiers for displays
R1kaB3rN Jul 17, 2024
fd1266e
umu_run: add debug statement
R1kaB3rN Jul 17, 2024
193579f
umu_run: pass reference to each display's root window
R1kaB3rN Jul 17, 2024
aa64ae1
umu_run: ignore empty windows
R1kaB3rN Jul 17, 2024
f12d4bb
umu_run: update format
R1kaB3rN Jul 17, 2024
4326cd6
umu_run: update comments
R1kaB3rN Jul 17, 2024
f5d5f96
umu_run: remove debug statement
R1kaB3rN Jul 17, 2024
e3bf34b
umu_run: don't raise with the exception
R1kaB3rN Jul 17, 2024
4833dce
umu_run: pass the game window ids
R1kaB3rN Jul 17, 2024
9fc87ea
umu_run: update comments
R1kaB3rN Jul 18, 2024
b8b226e
umu_run: update debug statements
R1kaB3rN Jul 18, 2024
a708056
umu_run: continue when empty windows are returned
R1kaB3rN Jul 18, 2024
365146d
umu_run: don't pass root windows
R1kaB3rN Jul 18, 2024
06e0468
umu_run: access the root window from the display
R1kaB3rN Jul 18, 2024
0b730c8
umu_run: remove debug statement
R1kaB3rN Jul 18, 2024
157451a
umu_run: update docstrings
R1kaB3rN Jul 18, 2024
6c99de8
umu_run: use the function to get the sequence
R1kaB3rN Jul 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
umu_run: refactor window_setup
R1kaB3rN committed Jul 17, 2024

Verified

This commit was signed with the committer’s verified signature.
commit b10222c6c62d344581458df0c41320dbc1b3d81f
19 changes: 14 additions & 5 deletions umu/umu_run.py
Original file line number Diff line number Diff line change
@@ -548,18 +548,27 @@ def set_gamescope_baselayer_order( # noqa
log.exception(e)


def window_setup(gamescope_baselayer_sequence: list[int]) -> None: # noqa
def window_setup( # noqa
d_primary: display.Display,
d_secondary: display.Display,
gamescope_baselayer_sequence: list[int],
) -> None:
game_window_ids: list[str] = []

if gamescope_baselayer_sequence:
# Rearrange the sequence
rearranged_sequence, steam_assigned_layer_id = (
rearrange_gamescope_baselayer_order(gamescope_baselayer_sequence)
)

# Assign our window a STEAM_GAME id
game_window_ids = get_window_client_ids()
if game_window_ids:
set_steam_game_property(game_window_ids, steam_assigned_layer_id)
while not game_window_ids:
game_window_ids = get_window_client_ids(d_primary)

set_gamescope_baselayer_order(rearranged_sequence)
set_steam_game_property(
d_primary, game_window_ids, steam_assigned_layer_id
)
set_gamescope_baselayer_order(d_secondary, rearranged_sequence)


def monitor_baselayer(