git: 20fe95fa68aa - main - x11/gnome-shell: Fix crashes on start

Neel Chauhan nc at FreeBSD.org
Sat Oct 2 03:49:44 UTC 2021


The branch main has been updated by nc:

URL: https://cgit.FreeBSD.org/ports/commit/?id=20fe95fa68aa30b264a4a6c9762ef5579efa7fd3

commit 20fe95fa68aa30b264a4a6c9762ef5579efa7fd3
Author:     Neel Chauhan <nc at FreeBSD.org>
AuthorDate: 2021-10-02 03:49:17 +0000
Commit:     Neel Chauhan <nc at FreeBSD.org>
CommitDate: 2021-10-02 03:49:41 +0000

    x11/gnome-shell: Fix crashes on start
---
 x11/gnome-shell/Makefile                           |   1 +
 x11/gnome-shell/files/patch-js_gdm_loginDialog_js  | 156 +++++++++++++++++++++
 .../files/patch-js_ui_endSessionDialog_js          |  41 ++++++
 3 files changed, 198 insertions(+)

diff --git a/x11/gnome-shell/Makefile b/x11/gnome-shell/Makefile
index fdc147c700a7..0be92d82db4f 100644
--- a/x11/gnome-shell/Makefile
+++ b/x11/gnome-shell/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	gnome-shell
 PORTVERSION=	41.0
+PORTREVISION=	1
 CATEGORIES=	x11 gnome
 MASTER_SITES=	GNOME/sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+)\..*/\1/}
 DIST_SUBDIR=	gnome
diff --git a/x11/gnome-shell/files/patch-js_gdm_loginDialog_js b/x11/gnome-shell/files/patch-js_gdm_loginDialog_js
new file mode 100644
index 000000000000..620a85197b15
--- /dev/null
+++ b/x11/gnome-shell/files/patch-js_gdm_loginDialog_js
@@ -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);
+ 
diff --git a/x11/gnome-shell/files/patch-js_ui_endSessionDialog_js b/x11/gnome-shell/files/patch-js_ui_endSessionDialog_js
new file mode 100644
index 000000000000..48b951d4bfac
--- /dev/null
+++ b/x11/gnome-shell/files/patch-js_ui_endSessionDialog_js
@@ -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));
+-            }
+         }
+     }
+ 


More information about the dev-commits-ports-all mailing list