Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
c93515c4ed | |||
b584834bfc |
2 changed files with 14 additions and 2 deletions
|
@ -252,7 +252,19 @@ void FbWindow::updateBackground(bool only_if_alpha) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void FbWindow::setBorderColor(const FbTk::Color &border_color) {
|
void FbWindow::setBorderColor(const FbTk::Color &border_color) {
|
||||||
XSetWindowBorder(display(), m_window, border_color.pixel());
|
unsigned long pixel = border_color.pixel();
|
||||||
|
XWindowAttributes attr;
|
||||||
|
if (XGetWindowAttributes(display(), m_window, &attr)
|
||||||
|
&& attr.colormap != DefaultColormap(display(), m_screen_num)) {
|
||||||
|
XColor color;
|
||||||
|
color.red = border_color.red() * 0x101;
|
||||||
|
color.green = border_color.green() * 0x101;
|
||||||
|
color.blue = border_color.blue() * 0x101;
|
||||||
|
if (XAllocColor(display(), attr.colormap, &color)){
|
||||||
|
pixel = color.pixel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
XSetWindowBorder(display(), m_window, pixel);
|
||||||
m_border_color = border_color.pixel();
|
m_border_color = border_color.pixel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ bool WindowState::useTabs() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WindowState::useTitlebar() const {
|
bool WindowState::useTitlebar() const {
|
||||||
return !fullscreen && deco_mask & DECORM_TITLEBAR;
|
return !fullscreen && maximized != MAX_FULL && deco_mask & DECORM_TITLEBAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowState::saveGeometry(int new_x, int new_y,
|
void WindowState::saveGeometry(int new_x, int new_y,
|
||||||
|
|
Loading…
Reference in a new issue