mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Fix not hiding Stream menu's grip handle sometimes
This commit is contained in:
parent
59a178bb16
commit
9719454ea1
@ -135,12 +135,6 @@ export class StreamUiHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static handleSystemMenu($streamHud: HTMLElement) {
|
private static handleSystemMenu($streamHud: HTMLElement) {
|
||||||
// Grip handle
|
|
||||||
const $gripHandle = $streamHud.querySelector('button[class^=GripHandle]') as HTMLElement;
|
|
||||||
if (!$gripHandle) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the last button
|
// Get the last button
|
||||||
const $orgButton = $streamHud.querySelector('div[class^=HUDButton]') as HTMLElement;
|
const $orgButton = $streamHud.querySelector('div[class^=HUDButton]') as HTMLElement;
|
||||||
if (!$orgButton) {
|
if (!$orgButton) {
|
||||||
@ -148,14 +142,11 @@ export class StreamUiHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const hideGripHandle = () => {
|
const hideGripHandle = () => {
|
||||||
if (!$gripHandle) {
|
// Grip handle
|
||||||
return;
|
const $gripHandle = document.querySelector('#StreamHud button[class^=GripHandle]') as HTMLElement;
|
||||||
|
if ($gripHandle && $gripHandle.ariaExpanded === 'true') {
|
||||||
|
$gripHandle.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
$gripHandle.dispatchEvent(new PointerEvent('pointerdown'));
|
|
||||||
$gripHandle.click();
|
|
||||||
$gripHandle.dispatchEvent(new PointerEvent('pointerdown'));
|
|
||||||
$gripHandle.click();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create Stream Settings button
|
// Create Stream Settings button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user