Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a new case of high CPU usage with scaling #1930

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions plugin-taskbar/lxqttaskbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,35 +156,6 @@ void LXQtTaskButton::updateIcon()
setIcon(ico.isNull() ? XdgIcon::defaultApplicationIcon() : ico);
}

/************************************************

************************************************/
void LXQtTaskButton::refreshIconGeometry(QRect const & geom)
{
xcb_connection_t* x11conn = QX11Info::connection();

if (!x11conn) {
return;
}

NETWinInfo info(x11conn,
windowId(),
(WId) QX11Info::appRootWindow(),
NET::WMIconGeometry,
NET::Properties2());
NETRect const curr = info.iconGeometry();
if (curr.pos.x != geom.x() || curr.pos.y != geom.y()
|| curr.size.width != geom.width() || curr.size.height != geom.height())
{
NETRect nrect;
nrect.pos.x = geom.x();
nrect.pos.y = geom.y();
nrect.size.height = geom.height();
nrect.size.width = geom.width();
info.setIconGeometry(nrect);
}
}

/************************************************

************************************************/
Expand Down
1 change: 0 additions & 1 deletion plugin-taskbar/lxqttaskbutton.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class LXQtTaskButton : public QToolButton

LXQtTaskBar * parentTaskBar() const {return mParentTaskBar;}

void refreshIconGeometry(QRect const & geom);
static QString mimeDataFormat() { return QLatin1String("lxqt/lxqttaskbutton"); }
/*! \return true if this button received DragEnter event (and no DragLeave event yet)
* */
Expand Down
10 changes: 0 additions & 10 deletions plugin-taskbar/lxqttaskgroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,18 +439,8 @@ void LXQtTaskGroup::setPopupVisible(bool visible, bool fast)
************************************************/
void LXQtTaskGroup::refreshIconsGeometry()
{
QRect rect = geometry();
rect.moveTo(mapToGlobal(QPoint(0, 0)));

if (mSingleButton)
{
refreshIconGeometry(rect);
return;
}

for(LXQtTaskButton *but : qAsConst(mButtonHash))
{
but->refreshIconGeometry(rect);
but->setIconSize(QSize(plugin()->panel()->iconSize(), plugin()->panel()->iconSize()));
}
}
Expand Down
Loading