Commit graph

84 commits

Author SHA1 Message Date
Daniel Eklöf
9dbbc480e4
Rename project: f00bar -> yambar 2019-09-28 20:39:45 +02:00
Daniel Eklöf
f29f96be96
bar/wayland: use preferred monitor if user didn't specify one 2019-09-22 12:08:08 +02:00
Daniel Eklöf
18e9d67d77
bar/wayland: fail when we can't find the specified monitor 2019-09-22 11:59:48 +02:00
Daniel Eklöf
4ce314e328
cairo: drop all remaining references to cairo
We now use pixman (and freetype + fontconfig) exclusively.
2019-09-22 11:52:37 +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
9b5dca52e2
bar/wayland: scale mouse position on mouse entry 2019-07-05 10:27:33 +02:00
Daniel Eklöf
e980a74a10
bar/wayland: spell 'disconnected' correctly 2019-06-07 14:08:14 +02:00
Daniel Eklöf
0e4fbb602c bar/wayland: read cursor theme/size from XCURSOR_* environment variables 2019-05-21 21:43:12 +02:00
Daniel Eklöf
3adbf70a49 bar/wayland: scale mouse cursor's hotspot coordinate 2019-05-15 19:04:10 +02:00
Daniel Eklöf
d172cc1cd5 bar/wayland: scale cursor surface
Fixes low-res mouse cursor on HiDPI outputs.
2019-05-15 18:57:11 +02:00
Daniel Eklöf
b41255dbcc bar: wayland: check return values of ftruncate(), read() and write()
Fixes building with -D_FORTIFY_SOURCE=2
2019-05-04 11:27:51 +02:00
Daniel Eklöf
879d5cefb1 wayland: HiDPI: initial support for HiDPI displays
We do it differently from everybody else...

A traditional HiDPI implementation typically scales up
everything. I.e. if the user wants a 1px border, it's scaled up to
2px. The wayland server typically presents an output width/height that
has been scaled *down*.

This is all a bit backwards, but perhaps was the best choice to make
legacy applications at least work.

f00bar on the other hand, wants to give the user absolute
control. Thus, we don't scale up at all. If the user wants a 25px bar
height, that's what he gets.

This does mean however, that we need to scale *down* the surface size
since it's in logical pixels, not physical.

So we scale *down* the surface size (which then gets scaled back up by
the wayland server), and then render everything *on* that surface
without any scaling.
2019-04-15 11:08:38 +02:00
Daniel Eklöf
0aee7befd8 bar/wayland: better name for SHM backing memfd 2019-03-30 22:24:13 +01:00
Daniel Eklöf
fa586b9ac1 wayland: depend on xdg-output for output size/positioning information 2019-03-14 19:41:06 +01:00
Daniel Eklöf
6030ef5298 bar/wayland: use cairo_format_stride_for_width() to calculate stride 2019-03-03 12:56:13 +01:00
Daniel Eklöf
fe709bd82b Revert "bar/wayland: drop wl_seat interface version requirement to 1"
This reverts commit a1bcf07599.
2019-02-18 21:43:44 +01: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
3d8cb7f17e bar/wayland: implement border margins 2019-02-17 15:47:44 +01:00
Daniel Eklöf
12ef2569a4 bar/wayland: log *something* when a global is removed 2019-02-17 12:38:52 +01:00
Daniel Eklöf
a1bcf07599 bar/wayland: drop wl_seat interface version requirement to 1
This allows us to drop the empty 'name' handler.
2019-02-17 12:38:52 +01:00
Daniel Eklöf
ad3a33cf3d bar/wayland: do *not* enable keyboard interactivity 2019-02-07 18:27:09 +01:00
Daniel Eklöf
76655bc944 bar/wayland: much improved error handling
Most asserts() have now been replaced with error messages. Cleanup()
no longer tries to free/destroy NULL resources.
2019-02-07 11:51:42 +01:00
Daniel Eklöf
0fc5778107 bar/wayland: wl_* APIs typically don't handle destroy(NULL) 2019-02-07 11:22:02 +01:00
Daniel Eklöf
4a064ebfff bar/wayland: fix includes 2019-02-06 18:04:32 +01:00
Daniel Eklöf
73c62e9797 bar/wayland: cleanup 2019-02-03 17:45:26 +01:00
Daniel Eklöf
29b57bcc48 bar/wayland: call on_mouse() directly from listeners 2019-02-03 15:28:32 +01:00
Daniel Eklöf
85a1940e47 bar/wayland: free XDG outputs, and manager, in cleanup() 2019-02-03 15:16:19 +01:00
Daniel Eklöf
c6fd99f005 bar/wayland: track XDG outputs, as this gets us the monitor identifiers 2019-02-03 15:10:26 +01:00
Daniel Eklöf
c226f9f0c8 bar/wayland: initial support for multiple monitors
We don't actually support multiple monitors, but now we at least track
the available monitors.

This also adds support for the BAR_BOTTOM location.
2019-02-03 13:55:21 +01:00
Daniel Eklöf
47ac57dd03 bar/wayland: cursor support
This implements backend.set_cursor().
2019-02-03 13:13:10 +01:00
Daniel Eklöf
130043a259 bar/wayland: comment out most of the debug logging 2019-02-03 12:21:42 +01:00
Daniel Eklöf
ed8e17c6c9 wayland: mucho wip: initial sort-of-working wayland backend
Bar is drawn, though only TOP is supported atm. No
screen/display/output selection is possible yet. Mouse *click* works,
but not setting the cursor.

Lots of debug output, crappy code yada yada.
2019-02-03 11:08:53 +01:00