Merge branch 'master' into stdin
This commit is contained in:
commit
1c538a003d
@ -91,7 +91,7 @@ void Bar::show(wl_output* output)
|
|||||||
zwlr_layer_surface_v1_add_listener(_layerSurface.get(), &_layerSurfaceListener, this);
|
zwlr_layer_surface_v1_add_listener(_layerSurface.get(), &_layerSurfaceListener, this);
|
||||||
auto anchor = topbar ? ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP : ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM;
|
auto anchor = topbar ? ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP : ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM;
|
||||||
zwlr_layer_surface_v1_set_anchor(_layerSurface.get(),
|
zwlr_layer_surface_v1_set_anchor(_layerSurface.get(),
|
||||||
anchor | ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT);
|
anchor | ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT);
|
||||||
|
|
||||||
auto barSize = barfont.height + paddingY * 2;
|
auto barSize = barfont.height + paddingY * 2;
|
||||||
zwlr_layer_surface_v1_set_size(_layerSurface.get(), 0, barSize);
|
zwlr_layer_surface_v1_set_size(_layerSurface.get(), 0, barSize);
|
||||||
@ -115,7 +115,7 @@ void Bar::setTag(int tag, int state, int numClients, int focusedClient)
|
|||||||
t.focusedClient = focusedClient;
|
t.focusedClient = focusedClient;
|
||||||
}
|
}
|
||||||
void Bar::setSelected(bool selected) { _selected = selected; }
|
void Bar::setSelected(bool selected) { _selected = selected; }
|
||||||
void Bar::setLayout(const std::string &layout) { _layoutCmp.setText(layout); }
|
void Bar::setLayout(const std::string& layout) { _layoutCmp.setText(layout); }
|
||||||
void Bar::setTitle(const std::string& title) { _titleCmp.setText(title); }
|
void Bar::setTitle(const std::string& title) { _titleCmp.setText(title); }
|
||||||
void Bar::setStatus(const std::string& status) { _statusCmp.setText(status); }
|
void Bar::setStatus(const std::string& status) { _statusCmp.setText(status); }
|
||||||
|
|
||||||
@ -231,7 +231,8 @@ void Bar::setColorScheme(const ColorScheme& scheme, bool invert)
|
|||||||
}
|
}
|
||||||
static void setColor(cairo_t* painter, const Color& color)
|
static void setColor(cairo_t* painter, const Color& color)
|
||||||
{
|
{
|
||||||
cairo_set_source_rgba(painter, color.r/255.0, color.g/255.0, color.b/255.0, color.a/255.0);
|
cairo_set_source_rgba(painter,
|
||||||
|
color.r/255.0, color.g/255.0, color.b/255.0, color.a/255.0);
|
||||||
}
|
}
|
||||||
void Bar::beginFg() { setColor(_painter, _colorScheme.fg); }
|
void Bar::beginFg() { setColor(_painter, _colorScheme.fg); }
|
||||||
void Bar::beginBg() { setColor(_painter, _colorScheme.bg); }
|
void Bar::beginBg() { setColor(_painter, _colorScheme.bg); }
|
||||||
|
@ -34,7 +34,7 @@ public:
|
|||||||
resetBuffer();
|
resetBuffer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
template<typename Consumer>
|
template<typename Consumer>
|
||||||
void dispatchLines(const Consumer& consumer)
|
void dispatchLines(const Consumer& consumer)
|
||||||
{
|
{
|
||||||
|
@ -127,7 +127,7 @@ static const struct wl_pointer_listener pointerListener = {
|
|||||||
wl_surface_commit(cursorSurface);
|
wl_surface_commit(cursorSurface);
|
||||||
}
|
}
|
||||||
wl_pointer_set_cursor(pointer, serial, cursorSurface,
|
wl_pointer_set_cursor(pointer, serial, cursorSurface,
|
||||||
cursorImage->hotspot_x, cursorImage->hotspot_y);
|
cursorImage->hotspot_x, cursorImage->hotspot_y);
|
||||||
},
|
},
|
||||||
.leave = [](void* sp, wl_pointer*, uint32_t serial, wl_surface*) {
|
.leave = [](void* sp, wl_pointer*, uint32_t serial, wl_surface*) {
|
||||||
auto& seat = *static_cast<Seat*>(sp);
|
auto& seat = *static_cast<Seat*>(sp);
|
||||||
|
Loading…
Reference in New Issue
Block a user