Skip to content

Commit

Permalink
fix: window motif hints is error of DMainWindow
Browse files Browse the repository at this point in the history
DMainWindow w;
w.show();
w.showMinimized();
w.hide();
w.showNormal();

Change-Id: I3befc796fced00aab18c1df2e6af9c968d3d2107
  • Loading branch information
zccrs authored and deepin-gerrit committed Nov 28, 2017
1 parent 5f47b89 commit 8f90556
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/dwindowmanagerhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ DWindowManagerHelper::MotifFunctions DWindowManagerHelper::getMotifFunctions(con
if (getMWMFunctions && window->handle()) {
quint32 hints = reinterpret_cast<quint32(*)(quint32)>(getMWMFunctions)(window->handle()->winId());

if (hints != MWM_FUNC_ALL)
if (!(hints & MWM_FUNC_ALL))
return (MotifFunctions)hints;
}

Expand Down Expand Up @@ -216,7 +216,7 @@ DWindowManagerHelper::MotifDecorations DWindowManagerHelper::getMotifDecorations
if (getMWMDecorations && window->handle()) {
quint32 hints = reinterpret_cast<quint32(*)(quint32)>(getMWMDecorations)(window->handle()->winId());

if (hints != MWM_DECOR_ALL )
if (!(hints & MWM_DECOR_ALL))
return (MotifDecorations)hints;
}

Expand Down

0 comments on commit 8f90556

Please sign in to comment.