Stopgap fix for cursor issue in Wayland

This commit is contained in:
wheaney 2024-04-15 15:24:43 -07:00
parent 8d4da0d56e
commit cc573b9897
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ export class CursorManager {
// stage fails when gnome-shell is restarting on x11 and the mouse // stage fails when gnome-shell is restarting on x11 and the mouse
// listener doesn't receive any events. Adding a small delay before // listener doesn't receive any events. Adding a small delay before
// starting the whole mouse cloning business helps. // starting the whole mouse cloning business helps.
this._enableTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 500, () => { this._enableTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 5000, () => {
this._enableTimeoutId = null; this._enableTimeoutId = null;
this._enable(); this._enable();
return GLib.SOURCE_REMOVE; return GLib.SOURCE_REMOVE;

View File

@ -60,8 +60,8 @@ export default class BreezyDesktopExtension extends Extension {
} }
_find_supported_monitor() { _find_supported_monitor() {
const target_monitor_id = this._monitor_manager.getMonitorPropertiesList() const target_monitor_id = this._monitor_manager.getMonitorPropertiesList()?.find(
.find(monitor => SUPPORTED_MONITOR_PRODUCTS.includes(monitor.product))?.index; monitor => SUPPORTED_MONITOR_PRODUCTS.includes(monitor.product))?.index;
if (target_monitor_id !== undefined) { if (target_monitor_id !== undefined) {
return this._monitor_manager.getMonitors()[target_monitor_id]; return this._monitor_manager.getMonitors()[target_monitor_id];
} }