Your message dated Thu, 19 Aug 2021 17:49:03 +0000
with message-id <[email protected]>
and subject line Bug#991153: fixed in icewm 2.7.0-1
has caused the Debian Bug report #991153,
regarding icewm: switching windows in taskbar order is broken
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
991153: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=991153
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: icewm
Version: 2.1.2-1
Severity: normal
Tags: patch
Dear Maintainer,
A patch in upstream icewm 2.1.0 broke the behaviour of switching windows in the
order they appear on the taskbar. This can be done by scrolling the mouse
wheel over the taskbar or with configuring special shortcuts.
At first this works but as soon as buttons are moved (e.g. by dragging) the
order becomes chaotic.
The Debian testing/unstable version of icewm 2.1.2 includes this problem.
That's a regression since current stable.
I reported the problem upstream: https://github.com/bbidulock/icewm/issues/602
It has now been fixed upstream by commit c16c44e936856bcebf11c8fd36028119c021e0
The patch applies nicely to 2.1.2
Could you please include this patch in the Debian package?
Thank you!
-- System Information:
Debian Release: 10.9
APT prefers stable
APT policy: (990, 'stable'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.19.0-16-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
commit c16c44e936856bcebf11c8fd36028119c021e0cc
Author: Bert Gijsbers <[email protected]>
Date: Thu Jul 15 21:36:20 2021 +0200
Rewrite task successor and task predecessor to properly take into account
the
separation of TaskBarApp and TaskButton as well as task grouping.
Resolves #602, resolves #604.
[rediffed against 2.1.2 by Jiri Bohac]
diff --git a/src/atasks.cc b/src/atasks.cc
index fe5405e9..b47fe05a 100644
--- a/src/atasks.cc
+++ b/src/atasks.cc
@@ -125,6 +125,38 @@ void TaskButton::remove(TaskBarApp* tapp) {
}
}
+TaskBarApp* TaskButton::getNextShown(TaskBarApp* tapp) const {
+ if (grouping()) {
+ int k = tapp ? find(fGroup, tapp) : -1;
+ if (k >= 0 || tapp == nullptr) {
+ while (++k < fGroup.getCount()) {
+ if (fGroup[k]->getShown()) {
+ return fGroup[k];
+ }
+ }
+ }
+ } else if (tapp == nullptr) {
+ return fActive;
+ }
+ return nullptr;
+}
+
+TaskBarApp* TaskButton::getPrevShown(TaskBarApp* tapp) const {
+ if (grouping()) {
+ int k = tapp ? find(fGroup, tapp) : fGroup.getCount();
+ if (k > 0) {
+ while (--k >= 0) {
+ if (fGroup[k]->getShown()) {
+ return fGroup[k];
+ }
+ }
+ }
+ } else if (tapp == nullptr) {
+ return fActive;
+ }
+ return nullptr;
+}
+
void TaskButton::setShown(TaskBarApp* tapp, bool ashow) {
if (tapp == fActive) {
if (ashow != visible())
@@ -562,28 +594,46 @@ void TaskPane::insert(TaskBarApp* tapp) {
}
TaskBarApp* TaskPane::predecessor(TaskBarApp* tapp) {
- const int count = fApps.getCount();
- const int found = find(fApps, tapp);
- if (found >= 0) {
- for (int i = count - 1; 1 <= i; --i) {
- int k = (found + i) % count;
- if (fApps[k]->getShown()) {
- return fApps[k];
- }
+ TaskButton* button = tapp->button();
+ TaskBarApp* prev = button->getPrevShown(tapp);
+ if (prev && button->getShown()) {
+ return prev;
+ } else {
+ int k = find(fTasks, button);
+ if (k >= 0) {
+ int i = k;
+ do {
+ i = (i - 1 + fTasks.getCount()) % fTasks.getCount();
+ if (fTasks[i]->getShown()) {
+ prev = fTasks[i]->getPrevShown(nullptr);
+ if (prev && prev != tapp) {
+ return prev;
+ }
+ }
+ } while (i != k);
}
}
return nullptr;
}
TaskBarApp* TaskPane::successor(TaskBarApp* tapp) {
- const int count = fApps.getCount();
- const int found = find(fApps, tapp);
- if (found >= 0) {
- for (int i = 1; i < count; ++i) {
- int k = (found + i) % count;
- if (fApps[k]->getShown()) {
- return fApps[k];
- }
+ TaskButton* button = tapp->button();
+ TaskBarApp* next = button->getNextShown(tapp);
+ if (next && button->getShown()) {
+ return next;
+ } else {
+ int k = find(fTasks, button);
+ if (k >= 0) {
+ int i = k;
+ do {
+ i = (i + 1) % fTasks.getCount();
+ if (fTasks[i]->getShown()) {
+ next = fTasks[i]->getNextShown(nullptr);
+ if (next && next != tapp) {
+ return next;
+ }
+ }
+ } while (i != k);
}
}
return nullptr;
diff --git a/src/atasks.h b/src/atasks.h
index 14553e7b..769d2f1d 100644
--- a/src/atasks.h
+++ b/src/atasks.h
@@ -61,6 +61,8 @@ public:
int getOrder() const;
int getCount() const;
+ TaskBarApp* getNextShown(TaskBarApp* tapp) const;
+ TaskBarApp* getPrevShown(TaskBarApp* tapp) const;
TaskBarApp* getActive() const { return fActive; }
ClientData* getFrame() const { return fActive->getFrame(); }
TaskPane* taskPane() const { return fTaskPane; }
--- End Message ---
--- Begin Message ---
Source: icewm
Source-Version: 2.7.0-1
Done: Eduard Bloch <[email protected]>
We believe that the bug you reported is fixed in the latest version of
icewm, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Eduard Bloch <[email protected]> (supplier of updated icewm package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Thu, 19 Aug 2021 19:16:50 +0200
Source: icewm
Architecture: source
Version: 2.7.0-1
Distribution: unstable
Urgency: low
Maintainer: Eduard Bloch <[email protected]>
Changed-By: Eduard Bloch <[email protected]>
Closes: 991153
Changes:
icewm (2.7.0-1) unstable; urgency=low
.
* New upstream release (closes: #991153)
Checksums-Sha1:
6e1075e46b145b433facf9ddce2e3d139cf7861a 2229 icewm_2.7.0-1.dsc
baabc73f148c58dff6a9678e44b3835fc6e197dc 1433744 icewm_2.7.0.orig.tar.xz
09655912de802e6f7687ded8202a495ec335a901 64840 icewm_2.7.0-1.debian.tar.xz
790829389ed3d55ff193e1da6e31f9554635e3c9 14168 icewm_2.7.0-1_source.buildinfo
Checksums-Sha256:
c5ebfba18a077b724f88c93a4ea7fe12deef84dab092000a0ad4ac0ecf4bc23c 2229
icewm_2.7.0-1.dsc
a597a0e8421d286d13ebd1491774166b09b9145a3c7255bb94a37fac8a9fd5dd 1433744
icewm_2.7.0.orig.tar.xz
f8cdfc3df29e7a3c2122f74a43a544410da3ee1c0a7db169c85ccf440d154820 64840
icewm_2.7.0-1.debian.tar.xz
cd8caec897e56c4ab0bd5c6b7d2e287b6b00a045289311499f958abfc45ec3a4 14168
icewm_2.7.0-1_source.buildinfo
Files:
0c09364ead334d9ad4e1c19660c9b8fc 2229 x11 optional icewm_2.7.0-1.dsc
26229fdcd10918f8747bb2baf342d076 1433744 x11 optional icewm_2.7.0.orig.tar.xz
0a790261f39507babb64902d55c55826 64840 x11 optional icewm_2.7.0-1.debian.tar.xz
21ea8e77feea2a628c9905e2cc5bee65 14168 x11 optional
icewm_2.7.0-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEZI3Zj0vEgpAXyw40aXQOXLNf7DwFAmEelvAACgkQaXQOXLNf
7DwA7w//QpipCrsizZ2nxzvOnurC5+bqu0+ScUJdkoCWpGJaffNGp5Kxtpu3um6N
meCzT4AggONyg4WQ3qQnbhb9XZth7F0/Jb65iOXDdFUEgxW5sN/H6zbHPsC84rOd
rUX/L/w4jRsp+1NHxO10w1k92x1f1ZKwXtjI8lrRGKxukWhJSulS3TgtoNOA2eGz
FXaUb31YCMV7/rS7JoanRGGidWrschkjQvRWfgXlJjTKkI7DwjIOq4Gjf8l5Mye4
IMLQuX+V/fa48pvYCX2RXR8toiweauDBeQh19n0xy9rIOPi+YbBi6f3amJ6xOEiT
XdGzzzz6ykUYiayZd9NWc0KeGrSSDHUmvEinlMT70UrK2wRCor/5+q0Pan0gP4zl
GWpBZ4vJi8kRFCQH1yb/Dfy7YesEx2JkrMp56hRHTbPubkbGxNjCrXFOXwh4byy+
6zUIXpnvscBxvRUdkFTlPd5vgR62/5NIOIBOmaVezD83sTk70qriOUyIr+YzoOA0
02G2VW4FVWMWhPEnDlEVS//P2c5o+3MNrDa6JHb7OduM2hJL7bl+UVFStmfP50AM
Ni3pAH4x8TFkaScL4Q6A7/ZJQ4MyXZhFMiADsYGSoKXWyBB005Sjm80HiQlnLfgt
HEu6+PRcbMw5ArvOPKXzG0ARP+M4v4M7WU0IDgU9m3q1yA6vX0g=
=EdyD
-----END PGP SIGNATURE-----
--- End Message ---