fix remaining warnings
This commit is contained in:
parent
ba89fe0a93
commit
6b04f28b48
|
@ -110,23 +110,23 @@ struct xcb_colors_t {
|
|||
struct xcb_colors_t colors;
|
||||
|
||||
/* Horizontal offset between a workspace label and button borders */
|
||||
const static int ws_hoff_px = 4;
|
||||
static const int ws_hoff_px = 4;
|
||||
|
||||
/* Vertical offset between a workspace label and button borders */
|
||||
const static int ws_voff_px = 3;
|
||||
static const int ws_voff_px = 3;
|
||||
|
||||
/* Offset between two workspace buttons */
|
||||
const static int ws_spacing_px = 1;
|
||||
static const int ws_spacing_px = 1;
|
||||
|
||||
/* Offset between the statusline and 1) workspace buttons on the left
|
||||
* 2) the tray or screen edge on the right */
|
||||
const static int sb_hoff_px = 4;
|
||||
static const int sb_hoff_px = 4;
|
||||
|
||||
/* Additional offset between the tray and the statusline, if the tray is not empty */
|
||||
const static int tray_loff_px = 2;
|
||||
static const int tray_loff_px = 2;
|
||||
|
||||
/* Vertical offset between the bar and a separator */
|
||||
const static int sep_voff_px = 4;
|
||||
static const int sep_voff_px = 4;
|
||||
|
||||
/* We define xcb_request_failed as a macro to include the relevant line number */
|
||||
#define xcb_request_failed(cookie, err_msg) _xcb_request_failed(cookie, err_msg, __LINE__)
|
||||
|
@ -1941,7 +1941,7 @@ void draw_bars(bool unhide) {
|
|||
DLOG("Printing statusline!\n");
|
||||
|
||||
int tray_width = get_tray_width(outputs_walk->trayclients);
|
||||
int max_statusline_width = outputs_walk->rect.w - workspace_width - tray_width - 2 * logical_px(sb_hoff_px);
|
||||
uint32_t max_statusline_width = outputs_walk->rect.w - workspace_width - tray_width - 2 * logical_px(sb_hoff_px);
|
||||
|
||||
/* If the statusline is too long, try to use short texts. */
|
||||
if (statusline_width > max_statusline_width)
|
||||
|
|
|
@ -60,7 +60,7 @@ int sasprintf(char **strp, const char *fmt, ...) {
|
|||
}
|
||||
|
||||
ssize_t writeall(int fd, const void *buf, size_t count) {
|
||||
int written = 0;
|
||||
size_t written = 0;
|
||||
ssize_t n = 0;
|
||||
|
||||
while (written < count) {
|
||||
|
@ -70,7 +70,7 @@ ssize_t writeall(int fd, const void *buf, size_t count) {
|
|||
continue;
|
||||
return n;
|
||||
}
|
||||
written += n;
|
||||
written += (size_t)n;
|
||||
}
|
||||
|
||||
return written;
|
||||
|
|
|
@ -874,12 +874,16 @@ static void handle_client_message(xcb_client_message_event_t *event) {
|
|||
.root_y = y_root,
|
||||
.event_x = x_root - (con->rect.x),
|
||||
.event_y = y_root - (con->rect.y)};
|
||||
if (direction == _NET_WM_MOVERESIZE_MOVE) {
|
||||
switch (direction) {
|
||||
case _NET_WM_MOVERESIZE_MOVE:
|
||||
floating_drag_window(con->parent, &fake);
|
||||
} else if (direction >= _NET_WM_MOVERESIZE_SIZE_TOPLEFT && direction <= _NET_WM_MOVERESIZE_SIZE_LEFT) {
|
||||
break;
|
||||
case _NET_WM_MOVERESIZE_SIZE_TOPLEFT... _NET_WM_MOVERESIZE_SIZE_LEFT:
|
||||
floating_resize_window(con->parent, FALSE, &fake);
|
||||
} else {
|
||||
break;
|
||||
default:
|
||||
DLOG("_NET_WM_MOVERESIZE direction %d not implemented\n", direction);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
DLOG("unhandled clientmessage\n");
|
||||
|
@ -1214,7 +1218,7 @@ static bool handle_strut_partial_change(void *data, xcb_connection_t *conn, uint
|
|||
con->window->dock = W_DOCK_BOTTOM;
|
||||
} else {
|
||||
DLOG("Ignoring invalid reserved edges (_NET_WM_STRUT_PARTIAL), using position as fallback:\n");
|
||||
if (con->geometry.y < (int16_t)(search_at->rect.height / 2)) {
|
||||
if (con->geometry.y < (search_at->rect.height / 2)) {
|
||||
DLOG("geom->y = %d < rect.height / 2 = %d, it is a top dock client\n",
|
||||
con->geometry.y, (search_at->rect.height / 2));
|
||||
con->window->dock = W_DOCK_TOP;
|
||||
|
|
Loading…
Reference in New Issue