Commit graph

21 commits

Author SHA1 Message Date
Delgan
b85ba99980 Apply "clang-format" preferences globally 2024-04-07 10:05:10 +02:00
natemaia
39a5493450 Fix: X11 struts
https://specifications.freedesktop.org/wm-spec/wm-spec-1.3.html#idm45643490065584
2021-12-09 02:07:24 +01:00
Daniel Eklöf
74016d7d33
bar: add bar->output_name(), returns the name of the output we’re on 2021-08-09 19:56:47 +02:00
Daniel Eklöf
5e6e9e189b
bar: xcb: add support for mouse wheel up/down 2021-07-01 17:15:53 +02:00
Daniel Eklöf
dd724d1bc2
exposable: add ‘btn’ argument to on_mouse() 2021-07-01 17:15:52 +02:00
Daniel Eklöf
08fa56a0f4
bar: set thread name of the bar’s own thread 2021-06-21 18:16:22 +02:00
Daniel Eklöf
d0f1f762ea
bar/xcb: fallback to non-primary monitor
If the user did *not* configured a specific monitor, we prefer the
primary monitor. However, if that monitor is disconnected, yambar
would exit with:

  no matching monitor

This patch changes this, to use the *last* connected monitor. It also
improves the error message.

Note: if the user did specify a monitor in the configuration, but
perhaps misspelled it, we will *not* fallback to another monitor, but
instead log an error saying that specific monitor could not be found.
2020-12-04 21:16:14 +01:00
Daniel Eklöf
f04b1e806c
bar: let backend check if xcursor should be updated or not
This allows the backend to support multi-seat "properly", by checking
against the correct seat. Before this, when we used a single, global
xcursor value, a seat whose pointer needed to be updated would not be
updated.
2020-07-09 19:02:02 +02:00
Daniel Eklöf
9dbbc480e4
Rename project: f00bar -> yambar 2019-09-28 20:39:45 +02:00
Daniel Eklöf
01e71590e0
bar: don't use cairo
This is trivial in the Wayland backend; just instantiate a pixman
pointing to the same mmapped memory as the wayland buffer.

In the XCB backend, we change the implementation slightly; instead of
rendering via a cairo XCB surface backend (to a server side pixmap),
which is then blitted to the window in commit(), we now render to a
client-side pixman pixmap, and blit it using xcb_put_image() in
commit().
2019-09-22 11:46:46 +02:00
Daniel Eklöf
c11fee4ce3
cairo: replace cairo with pixman in decos, particles and modules
All decoration, particle and module interfaces now takes a
pixman_image_t parameter, and all drawing is done using pixman APIs.

The wayland/xcb backends implement a new interface functions,
get_pixman_image(), that should return a pixman image instance that is
suitable for rendering.

In the wayland backend, the image uses the same backing data as the
cairo surface.

In the XCB backend, we create a new image each time, and then blit it
to the cairo surface at commit time.
2019-09-22 01:56:58 +02:00
Daniel Eklöf
2450cbe7a6 bar: xcb: check return values of ftruncate(), read() and write()
Fixes building with -D_FORTIFY_SOURCE=2
2019-05-04 11:28:17 +02:00
Daniel Eklöf
28d39f3aec bar/xcb: ignore non-zero border margins 2019-02-17 19:45:26 +01:00
Daniel Eklöf
0ab772f869 bar: move x,y coordinates to xcb backend 2019-02-17 19:40:20 +01:00
Daniel Eklöf
e48d90ae12 bar/xcb: cleanup: don't try to free NULL resources 2019-02-07 11:51:26 +01:00
Daniel Eklöf
deb9105d3e main: move xcb_init() call to bar's XCB backend 2019-01-29 21:37:38 +01:00
Daniel Eklöf
404a7a7dcd bar: xcb: remove unneeded braces 2019-01-29 21:05:51 +01:00
Daniel Eklöf
7f1567c973 bar: do generic cursor stuff in bar, not in backend 2019-01-29 21:05:28 +01:00
Daniel Eklöf
0684aaaf95 bar: xcb: cleanup 2019-01-29 21:03:13 +01:00
Daniel Eklöf
4954479e11 bar: generic setup shouldn't be done by a backend 2019-01-29 21:02:10 +01:00
Daniel Eklöf
88daaf0ab7 bar: wip: define a 'backend' interface
Implement the current XCB backend in terms of this new interface.
2019-01-29 20:59:25 +01:00