Skip to content

Commit

Permalink
feat: support to only update width or height
Browse files Browse the repository at this point in the history
as title.
  • Loading branch information
18202781743 committed Jul 5, 2024
1 parent cfdc347 commit fd4eda7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/tray-wayland-integration/pluginsurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ void PluginSurface::plugin_close()

void PluginSurface::plugin_geometry(int32_t x, int32_t y, int32_t width, int32_t height)

Check warning on line 44 in src/tray-wayland-integration/pluginsurface.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

The function 'plugin_geometry' is never used.
{
if (width > 0 && height > 0) {
m_window->setGeometry(x, y, width, height);
}
QRect rect(x, y, width, height);
if (width <= 0)
rect.setWidth(m_window->width());
if (height <= 0)
rect.setHeight(m_window->height());

Q_EMIT m_plugin->eventGeometry(QRect(x, y, width, height));
m_window->setGeometry(rect);
Q_EMIT m_plugin->eventGeometry(rect);
}

void PluginSurface::plugin_raw_global_pos(int32_t x, int32_t y)

Check warning on line 56 in src/tray-wayland-integration/pluginsurface.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

The function 'plugin_raw_global_pos' is never used.
Expand Down

0 comments on commit fd4eda7

Please sign in to comment.