Commit Graph

17 Commits

Author SHA1 Message Date
Simon Plakolb b8322c4b4b button: Add AButton class
The AButton class is designed as full a substitute to ALabel. The
GtkButton attribute 'button_' is initialized with a label. This
label can the be referenced by the subsequent inheritors of AButton
instead of the GtkLabel attribute 'label_' of ALabel.
For convenience a GtkLabel* 'label_' attribute is added to AButton.

If the button cannot be clicked it is disabled, effectively acting
like its label predecessor.

GtkButton seems to catch one-click mouse events regardless of the
flags set on it. Therefore, 'signal_pressed' is connected to a
function creating a fake GdkEventButton* and calling 'handleToggle'
(for details on this possible bug in GTK see:
https://stackoverflow.com/questions/45334911 )

In accordance with other GtkButtons (i.e. the sway/workspace ones)
set_relief(Gtk::RELIEF_NONE) is called on the 'button_' instance.
2022-10-12 10:25:29 +02:00
Alex f2fcadbf62 refactor: lint 2022-04-06 08:37:19 +02:00
Aleksei Bavshin ae6ca36fa7
fix(sway): resolve destruction dependency between Ipc and SleeperThread
Ipc destructor closes socket and thus wakes up SleeperThread which was
waiting for socket data in Ipc::handleEvent.
Ipc::handleEvent then proceeds with sending signal to already destroyed
object, causing heap-use-after-free Address Sanitizer error.
2020-02-04 23:22:43 -08:00
Alex ff9d598c16 fix: add proper mutex 2019-06-17 11:39:45 +02:00
Alex fcf2d18a01 refactor: destroy threads first 2019-05-29 17:53:22 +02:00
Alex 2a9fa1a4b9 refactor(bar): onRealize, onMap 2019-05-25 17:50:45 +02:00
Alex 362c393b1d refactor: try/catch, sigc trackable 2019-05-13 15:15:50 +02:00
Alex 5a44c8c6de refactor: avoid unneeded json parsing 2019-05-07 13:43:48 +02:00
Alex b75e0bb0d0 refactor: remove useless bar param 2019-05-07 13:21:18 +02:00
Alex 311c34ecbc feat(Bar): handle widget size changes 2019-04-24 12:37:24 +02:00
Alex cccf60c30e fix(Workspaces): fix concurrence and move json parser to ipc client 2019-04-23 11:42:08 +02:00
Alex bb1cf7570e refactor(IPC): use sigc signal 2019-04-19 11:09:06 +02:00
Alex 6ed8f94dab refactor: format code 2019-04-18 17:52:00 +02:00
Alexis 399f61df98 refactor: proper modules destruction 2019-01-13 22:22:22 +01:00
Alexis b554094c7e feat: args && class id 2018-12-18 17:30:54 +01:00
Alexis 691fb88057 refactor(modules): const bar 2018-12-01 00:10:41 +01:00
Robinhuett a042eea384 Add module to show sway binding mode 2018-10-30 13:39:30 +01:00