Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gnome-shell-extensions
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
staging
rpms
gnome-shell-extensions
Commits
f8a13122
Commit
f8a13122
authored
2 years ago
by
Rocky Automation
Browse files
Options
Downloads
Patches
Plain Diff
import gnome-shell-extensions-3.32.1-33.el8
parent
b8ba4c2f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SOURCES/0001-desktop-icons-Don-t-use-blocking-IO.patch
+76
-0
76 additions, 0 deletions
SOURCES/0001-desktop-icons-Don-t-use-blocking-IO.patch
SPECS/gnome-shell-extensions.spec
+6
-1
6 additions, 1 deletion
SPECS/gnome-shell-extensions.spec
with
82 additions
and
1 deletion
SOURCES/0001-desktop-icons-Don-t-use-blocking-IO.patch
0 → 100644
+
76
−
0
View file @
f8a13122
From 93e3e938b322433aff862bbc46f80c60ab7dc2ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Tue, 17 Jan 2023 20:31:21 +0100
Subject: [PATCH] desktop-icons: Don't use blocking IO
---
extensions/desktop-icons/desktopManager.js | 35 +++++++++++++++++-----
1 file changed, 28 insertions(+), 7 deletions(-)
diff --git a/extensions/desktop-icons/desktopManager.js b/extensions/desktop-icons/desktopManager.js
index 399aee03..2ce6eefb 100644
--- a/extensions/desktop-icons/desktopManager.js
+++ b/extensions/desktop-icons/desktopManager.js
@@ -53,6 +53,21 @@
function findMonitorIndexForPos(x, y) {
return getDpy().get_monitor_index_for_rect(new Meta.Rectangle({x, y}));
}
+async function queryInfo(file, attributes = DesktopIconsUtil.DEFAULT_ATTRIBUTES, cancellable = null) {
+ const flags = Gio.FileQueryInfoFlags.NONE;
+ const priority = GLib.PRIORITY_DEFAULT;
+ return new Promise((resolve, reject) => {
+ file.query_info_async(attributes, flags, priority, cancellable, (o, res) => {
+ try {
+ const info = file.query_info_finish(res);
+ resolve(info);
+ } catch (e) {
+ reject(e);
+ }
+ });
+ });
+}
+
var DesktopManager = GObject.registerClass({
Properties: {
@@ -221,9 +236,7 @@
var DesktopManager = GObject.registerClass({
if (!this._unixMode) {
let desktopDir = DesktopIconsUtil.getDesktopDir();
- let fileInfo = desktopDir.query_info(Gio.FILE_ATTRIBUTE_UNIX_MODE,
- Gio.FileQueryInfoFlags.NONE,
- null);
+ let fileInfo = await queryInfo(desktopDir, Gio.FILE_ATTRIBUTE_UNIX_MODE);
this._unixMode = fileInfo.get_attribute_uint32(Gio.FILE_ATTRIBUTE_UNIX_MODE);
this._setWritableByOthers((this._unixMode & S_IWOTH) != 0);
}
@@ -268,14 +281,22 @@
var DesktopManager = GObject.registerClass({
Gio.FileQueryInfoFlags.NONE,
GLib.PRIORITY_DEFAULT,
this._desktopEnumerateCancellable,
- (source, result) => {
+ async (source, result) => {
try {
let fileEnum = source.enumerate_children_finish(result);
+ let extraFolders = await Promise.all(DesktopIconsUtil.getExtraFolders()
+ .map(async ([folder, extras]) => {
+ const info = await queryInfo(folder,
+ DesktopIconsUtil.DEFAULT_ATTRIBUTES,
+ this._desktopEnumerateCancellable);
+ return [folder, info, extras];
+ }));
+
let resultGenerator = function *() {
+ for (let [newFolder, info, extras] of extraFolders)
+ yield [newFolder, info, extras];
+
let info;
- for (let [newFolder, extras] of DesktopIconsUtil.getExtraFolders()) {
- yield [newFolder, newFolder.query_info(DesktopIconsUtil.DEFAULT_ATTRIBUTES, Gio.FileQueryInfoFlags.NONE, this._desktopEnumerateCancellable), extras];
- }
while ((info = fileEnum.next_file(null)))
yield [fileEnum.get_child(info), info, Prefs.FileType.NONE];
}.bind(this);
--
2.38.1
This diff is collapsed.
Click to expand it.
SPECS/gnome-shell-extensions.spec
+
6
−
1
View file @
f8a13122
...
...
@@ -6,7 +6,7 @@
Name: gnome-shell-extensions
Version: 3.32.1
Release: 3
2
%{?dist}
Release: 3
3
%{?dist}
Summary: Modify and extend GNOME Shell functionality and behavior
Group: User Interface/Desktops
...
...
@@ -55,6 +55,7 @@ Patch0026: 0001-fileItem-Just-destroy-menus.patch
Patch0027: 0001-fileItem-Support-.desktop-files-of-type-Link.patch
Patch0028: 0001-classification-banner-Handle-fullscreen-monitors.patch
Patch0029: 0001-gesture-inhibitor-Allow-inhibiting-workspace-switch-.patch
Patch0030: 0001-desktop-icons-Don-t-use-blocking-IO.patch
%description
GNOME Shell Extensions is a collection of extensions providing additional and
...
...
@@ -568,6 +569,10 @@ cp $RPM_SOURCE_DIR/gnome-classic.desktop $RPM_BUILD_ROOT%{_datadir}/xsessions
%changelog
* Tue Jan 17 2023 Florian Müllner <fmuellner@redhat.com> - 3.32.1-33
- Avoid blocking IO in desktop-icons
Resolves: #2162017
* Thu Jan 12 2023 Florian Müllner <fmuellner@redhat.com> - 3.32.1-32
- Add custom-menu extension
Resolves: #2033572
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment