Skip to content

Commit

Permalink
Don't bypass window manager (#171)
Browse files Browse the repository at this point in the history
Removed Qt::X11BypassWindowManagerHint to prevent nasty bugs like #153 where the window manager loses the track of the TopBar.
Removed Qt::WindowDoesNotAcceptFocus to get tooltips on the TopBar buttons.
Removed Qt::NoDropShadowWindowHint as this doesn't prevent drop shadow of Topbar anyway and I don't think having shadow around the TopBar when it has focus is a bad choice.
Tooltip updates.
  • Loading branch information
mominul committed Sep 24, 2020
1 parent 292b79e commit 68661d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/frontend/TopBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,7 @@ TopBar::~TopBar() {
}

void TopBar::SetupTopBar() {
#if defined(linux) || defined(__linux__) || defined(__linux)
this->setWindowFlags(
Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint |
Qt::WindowDoesNotAcceptFocus | Qt::NoDropShadowWindowHint);
#else
this->setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
#endif
this->setFixedSize(QSize(this->width(), this->height()));

if (gSettings->getTopBarWindowPosition() == QPoint(0, 0)) {
Expand Down
5 changes: 4 additions & 1 deletion src/frontend/TopBar.ui
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</rect>
</property>
<property name="toolTip">
<string>View information about current layout</string>
<string>View information about the current layout</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
Expand Down Expand Up @@ -117,6 +117,9 @@
<height>27</height>
</rect>
</property>
<property name="toolTip">
<string>Quit</string>
</property>
<property name="text">
<string/>
</property>
Expand Down

0 comments on commit 68661d8

Please sign in to comment.