Commit graph

13 commits

Author SHA1 Message Date
Delgan
b85ba99980 Apply "clang-format" preferences globally 2024-04-07 10:05:10 +02:00
Delgan
53dec73ed2
Fix miscalculation of list width in presence of empty particles 2024-04-01 09:10:58 +02:00
Daniel Eklöf
ca43eb3016
particle/dynlist: don’t adjust spacing if all sub-items are zero-width
That is, if all sub-items are zero-width, make sure *we* return a zero
width, instead of a negative width.
2021-08-25 18:48:15 +02:00
Daniel Eklöf
e11fe12c98
particles: fix mouse hover on non-primitive particles
If a ramp, map or progress-bar has an on-click handler, then the mouse
should _always_ reflect this.
2021-07-02 16:36:09 +02:00
Daniel Eklöf
c79ffbe057
Add support binding on-click handlers to other buttons than LEFT
One can now bind the left/middle/right mouse buttons to on-click. In
fact, you can have all three buttons bound to different handlers for
the same particle. The new syntax is

    on-click:
        left: <command>
        middle: <command>
        right: <command>

Leaving one out is the same thing as not mapping it at
all. Furthermore,

    on-click: <command>

is still valid, and is a shorthand for

    on-click:
        left: <commsnd>
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
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
95385863ae
particle: remove cairo context from begin_expose() 2019-09-22 00:55:06 +02:00
Daniel Eklöf
ea38ab3b2f particle/module: pass a cairo context to all begin_expose() 2019-02-28 20:10:26 +01:00
Daniel Eklöf
6bba9200cf particles: use calloc() instead of malloc()
In cases where it makes sense, use calloc() instead of malloc():

* When allocating large objects with many members, many for which
  NULL/0 is a good default value.
* Arrays etc where we explicitly initialize to NULL anyway.
2019-02-09 11:05:12 +01:00
Daniel Eklöf
bc9c33c187 particle/dynlist: link particle-sdk PRIVATE:ly 2019-01-13 21:45:49 +01:00
Daniel Eklöf
558f75a54b module/particle: remove cairo context from begin_expose() 2019-01-09 18:50:26 +01:00
Daniel Eklöf
52f13dec3d dynlist: move to particles folder 2018-12-29 22:13:00 +01:00
Renamed from modules/i3/dynlist-exposable.c (Browse further)