Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x11/gnome-shell: Fix crashes on start
- Loading branch information
1 parent
55e6acd
commit 20fe95f
Showing
3 changed files
with
198 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
$OpenBSD: patch-js_gdm_loginDialog_js,v 1.3 2021/06/14 18:54:25 jasper Exp $ | ||
|
||
Index: js/gdm/loginDialog.js | ||
--- js/gdm/loginDialog.js.orig | ||
+++ js/gdm/loginDialog.js | ||
@@ -42,6 +42,7 @@ var UserListItem = GObject.registerClass({ | ||
_init(user) { | ||
let layout = new St.BoxLayout({ | ||
vertical: true, | ||
+ x_align: Clutter.ActorAlign.START, | ||
}); | ||
super._init({ | ||
style_class: 'login-dialog-user-list-item', | ||
@@ -762,9 +763,6 @@ var LoginDialog = GObject.registerClass({ | ||
|
||
if (this._authPrompt.verificationStatus == AuthPrompt.AuthPromptStatus.NOT_VERIFYING) | ||
this._authPrompt.reset(); | ||
- | ||
- if (this._disableUserList && this._timedLoginUserListHold) | ||
- this._timedLoginUserListHold.release(); | ||
} | ||
} | ||
|
||
@@ -858,7 +856,6 @@ var LoginDialog = GObject.registerClass({ | ||
this._resetGreeterProxy(); | ||
this._sessionMenuButton.updateSensitivity(true); | ||
|
||
- const previousUser = this._user; | ||
this._user = null; | ||
|
||
if (this._nextSignalId) { | ||
@@ -866,11 +863,7 @@ var LoginDialog = GObject.registerClass({ | ||
this._nextSignalId = 0; | ||
} | ||
|
||
- if (previousUser && beginRequest === AuthPrompt.BeginRequestType.REUSE_USERNAME) { | ||
- this._user = previousUser; | ||
- this._authPrompt.setUser(this._user); | ||
- this._authPrompt.begin({ userName: previousUser.get_user_name() }); | ||
- } else if (beginRequest === AuthPrompt.BeginRequestType.PROVIDE_USERNAME) { | ||
+ if (beginRequest == AuthPrompt.BeginRequestType.PROVIDE_USERNAME) { | ||
if (!this._disableUserList) | ||
this._showUserList(); | ||
else | ||
@@ -1051,72 +1044,54 @@ var LoginDialog = GObject.registerClass({ | ||
let loginItem = null; | ||
let animationTime; | ||
|
||
- let tasks = [ | ||
- () => { | ||
- if (this._disableUserList) | ||
- return; | ||
+ let tasks = [() => this._waitForItemForUser(userName), | ||
|
||
- this._timedLoginUserListHold = this._waitForItemForUser(userName); | ||
- }, | ||
+ () => { | ||
+ loginItem = this._userList.getItemFromUserName(userName); | ||
|
||
- () => { | ||
- this._timedLoginUserListHold = null; | ||
+ // If there is an animation running on the item, reset it. | ||
+ loginItem.hideTimedLoginIndicator(); | ||
+ }, | ||
|
||
- if (this._disableUserList) | ||
- loginItem = this._authPrompt; | ||
- else | ||
- loginItem = this._userList.getItemFromUserName(userName); | ||
+ () => { | ||
+ // If we're just starting out, start on the right item. | ||
+ if (!this._userManager.is_loaded) | ||
+ this._userList.jumpToItem(loginItem); | ||
+ }, | ||
|
||
- // If there is an animation running on the item, reset it. | ||
- loginItem.hideTimedLoginIndicator(); | ||
- }, | ||
+ () => { | ||
+ // This blocks the timed login animation until a few | ||
+ // seconds after the user stops interacting with the | ||
+ // login screen. | ||
|
||
- () => { | ||
- if (this._disableUserList) | ||
- return; | ||
+ // We skip this step if the timed login delay is very short. | ||
+ if (delay > _TIMED_LOGIN_IDLE_THRESHOLD) { | ||
+ animationTime = delay - _TIMED_LOGIN_IDLE_THRESHOLD; | ||
+ return this._blockTimedLoginUntilIdle(); | ||
+ } else { | ||
+ animationTime = delay; | ||
+ return null; | ||
+ } | ||
+ }, | ||
|
||
- // If we're just starting out, start on the right item. | ||
- if (!this._userManager.is_loaded) | ||
- this._userList.jumpToItem(loginItem); | ||
- }, | ||
+ () => { | ||
+ // If idle timeout is done, make sure the timed login indicator is shown | ||
+ if (delay > _TIMED_LOGIN_IDLE_THRESHOLD && | ||
+ this._authPrompt.visible) | ||
+ this._authPrompt.cancel(); | ||
|
||
- () => { | ||
- // This blocks the timed login animation until a few | ||
- // seconds after the user stops interacting with the | ||
- // login screen. | ||
+ if (delay > _TIMED_LOGIN_IDLE_THRESHOLD || firstRun) { | ||
+ this._userList.scrollToItem(loginItem); | ||
+ loginItem.grab_key_focus(); | ||
+ } | ||
+ }, | ||
|
||
- // We skip this step if the timed login delay is very short. | ||
- if (delay > _TIMED_LOGIN_IDLE_THRESHOLD) { | ||
- animationTime = delay - _TIMED_LOGIN_IDLE_THRESHOLD; | ||
- return this._blockTimedLoginUntilIdle(); | ||
- } else { | ||
- animationTime = delay; | ||
- return null; | ||
- } | ||
- }, | ||
+ () => loginItem.showTimedLoginIndicator(animationTime), | ||
|
||
- () => { | ||
- if (this._disableUserList) | ||
- return; | ||
- | ||
- // If idle timeout is done, make sure the timed login indicator is shown | ||
- if (delay > _TIMED_LOGIN_IDLE_THRESHOLD && | ||
- this._authPrompt.visible) | ||
- this._authPrompt.cancel(); | ||
- | ||
- if (delay > _TIMED_LOGIN_IDLE_THRESHOLD || firstRun) { | ||
- this._userList.scrollToItem(loginItem); | ||
- loginItem.grab_key_focus(); | ||
- } | ||
- }, | ||
- | ||
- () => loginItem.showTimedLoginIndicator(animationTime), | ||
- | ||
- () => { | ||
- this._timedLoginBatch = null; | ||
- this._greeter.call_begin_auto_login_sync(userName, null); | ||
- }, | ||
- ]; | ||
+ () => { | ||
+ this._timedLoginBatch = null; | ||
+ this._greeter.call_begin_auto_login_sync(userName, null); | ||
+ }]; | ||
|
||
this._timedLoginBatch = new Batch.ConsecutiveBatch(this, tasks); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
$OpenBSD: patch-js_ui_endSessionDialog_js,v 1.1 2020/11/08 09:38:19 ajacoutot Exp $ | ||
|
||
Index: js/ui/endSessionDialog.js | ||
--- js/ui/endSessionDialog.js.orig | ||
+++ js/ui/endSessionDialog.js | ||
@@ -230,11 +230,6 @@ class EndSessionDialog extends ModalDialog.ModalDialog | ||
destroyOnClose: false }); | ||
|
||
this._loginManager = LoginManager.getLoginManager(); | ||
- this._loginManager.canRebootToBootLoaderMenu( | ||
- (canRebootToBootLoaderMenu, unusedNeedsAuth) => { | ||
- this._canRebootToBootLoaderMenu = canRebootToBootLoaderMenu; | ||
- }); | ||
- | ||
this._userManager = AccountsService.UserManager.get_default(); | ||
this._user = this._userManager.get_user(GLib.get_user_name()); | ||
this._updatesPermission = null; | ||
@@ -453,23 +448,6 @@ class EndSessionDialog extends ModalDialog.ModalDialog | ||
label, | ||
}); | ||
|
||
- // Add Alt "Boot Options" option to the Reboot button | ||
- if (this._canRebootToBootLoaderMenu && signal === 'ConfirmedReboot') { | ||
- this._rebootButton = button; | ||
- this._rebootButtonAlt = this.addButton({ | ||
- action: () => { | ||
- this.close(true); | ||
- let signalId = this.connect('closed', () => { | ||
- this.disconnect(signalId); | ||
- this._confirmRebootToBootLoaderMenu(); | ||
- }); | ||
- }, | ||
- label: C_('button', 'Boot Options'), | ||
- }); | ||
- this._rebootButtonAlt.visible = false; | ||
- this._capturedEventId = global.stage.connect('captured-event', | ||
- this._onCapturedEvent.bind(this)); | ||
- } | ||
} | ||
} | ||
|