1288
|
|
Set the initial task button text (and icon) correctly (#454)
Fixes https://github.com/lxde/lxqt/issues/1303.
Detailed explanation:
When a window shows up, the signal `KWindowSystem::stackingOrderChanged` is emitted *before* `KWindowSystem::windowAdded`. The former signal is connected to the function `LXQtTaskBar::refreshTaskList()`, which calls the functions `LXQtTaskBar::addWindow()` and `LXQtTaskBar::removeWindow()` to add and remove monitored windows.
Connecting `LXQtTaskBar::refreshTaskList()` to the signal `KWindowSystem::stackingOrderChanged` not only is redundant but also causes a problem:
(1) It's redundant because the job of adding *new* windows should be done by `LXQtTaskBar::onWindowAdded()` connected to the signal `KWindowSystem::windowAdded`. However, with the current code, `LXQtTaskBar::addWindow()` is never called by that function because the new window is already added through `KWindowSystem::stackingOrderChanged`. Similarly, `LXQtTaskBar::onWindowRemoved()` should be responsible for removing windows by being connected to the signal `KWindowSystem::windowRemoved`.
(2) More importantly, as the window name can change in the short interval between the emissions of `KWindowSystem::stackingOrderChanged` and `KWindowSystem::windowAdded`, the corresponding taskbar button may get a wrong text. The reason is that the signal `WindowSystem::windowChanged` announces changes only starting from the emission of `KWindowSystem::windowAdded`. (Theoretically, the initial icon might also be wrong but that's rarer).
Here, the connection to `KWindowSystem::stackingOrderChanged` is removed, so that the initial task button text/icon is set correctly. In this way, several useless calls to `LXQtTaskBar::refreshTaskList()` are also prevented when a window is shown/closed or focused/unfocused.
|
tsujan |
6 years ago
|
|
|
1287
|
|
|
notname000 |
6 years ago
|
|
|
1286
|
|
|
Balló György |
6 years ago
|
|
|
1285
|
|
|
Tsu Jan |
6 years ago
|
|
|
1284
|
|
|
Alf Gaida |
6 years ago
|
|
|
1283
|
|
|
Luís Pereira |
6 years ago
|
|
|
1282
|
|
|
Luís Pereira |
6 years ago
|
|
|
1281
|
|
|
comicfans |
6 years ago
|
|
|
1280
|
|
|
Alf Gaida |
6 years ago
|
|
|
1279
|
|
|
Palo Kisa |
6 years ago
|
|
|
1278
|
|
|
Luís Pereira |
6 years ago
|
|
|
1277
|
|
|
Palo Kisa |
6 years ago
|
|
|
1276
|
|
|
Palo Kisa |
6 years ago
|
|
|
1275
|
|
|
Palo Kisa |
6 years ago
|
|
|
1274
|
|
|
Alf Gaida |
6 years ago
|
|
|
1273
|
|
|
Palo Kisa |
6 years ago
|
|
|
1272
|
|
|
Palo Kisa |
6 years ago
|
|
|
1271
|
|
plugin-volume: Use a specific icon for the panel
Some "modern" icon themes have a specific panel icon for volumes. Arc, deepin, Faenza, Faience, Flattr, matefaenza, Menda-Circle, Numix, Numix-Light, Numix-uTouch, Paper, Papirus and it's derivatives are examples of that.
|
Luís Pereira |
6 years ago
|
|
|
1270
|
|
|
Luís Pereira |
6 years ago
|
|
|
1269
|
|
|
Palo Kisa |
6 years ago
|
|
|