Skip to content

Commit

Permalink
sync: from linuxdeepin/dtkgui
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#278
  • Loading branch information
deepin-ci-robot committed Nov 26, 2024
1 parent 44a3de7 commit ffde703
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/kernel/dplatformhandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,10 @@ DPlatformHandle::DPlatformHandle(QWindow *window, QObject *parent)
DPlatformHandle::~DPlatformHandle()
{
#ifndef DTK_DISABLE_TREELAND
g_platformThemeMap.value(this)->deleteLater();
g_platformThemeMap.remove(this);
if (auto it = g_platformThemeMap.find(this); it != g_platformThemeMap.end()) {
it.value()->deleteLater();
g_platformThemeMap.remove(it.key());
}
#endif
}

Expand Down Expand Up @@ -685,7 +687,7 @@ bool DPlatformHandle::setEnabledNoTitlebarForWindow(QWindow *window, bool enable

auto handle = dPlatformWindowInterfaceByWindow(window);
if (handle) {
handle->setEnabledNoTitlebar(true);
handle->setEnabledNoTitlebar(enable);
}
return true;
}
Expand Down

0 comments on commit ffde703

Please sign in to comment.