Commit Graph

9 Commits

Author SHA1 Message Date
Mykyta Holubakha
976e48d79f Initial work on window events 2016-07-21 21:51:20 +03:00
Mikkel Oscar Lyderik
6f7cbf2eac Replace deprecated function wlc_output_get_pixels.
This makes IPC GET_PIXELS use the new `wlc_pixels_read` call instead of
the deprecated `wlc_output_get_pixels`.

The old version worked by passing a callback function to wlc which would
grab the pixels and send them to the IPC client.
The new version works by maintaining a list of clients who have
requested the pixels of some output and then grap and send the pixels in
the output_post_render hook of the `wlc_interface`.
2016-02-08 12:39:07 +01:00
Mikkel Oscar Lyderik
6392abe35b Implement IPC binding event (keyboard)
This implements the IPC binding event for keyboard bindings.  It is
slightly different from the i3 implementation [1] since sway supports
more than one non-modifier key in a binding. Thus the json interface has
been changed from:

    {
      ...
      "symbol": "t",
      ...
    }

to:

    {
      ...
      "symbols": [ "t" ],
      ...
    }

[1] http://i3wm.org/docs/ipc.html#_binding_event
2016-01-08 03:03:55 +01:00
Mikkel Oscar Lyderik
c20c63b677 Send IPC modifier event on bar_modifier up/down
Detects when a bar modifier key is pressed/released and sends a modifier
IPC event to any listeners (usually swaybars).

This way a swaybar can listen on the modifier event and hide/show the
bar accordingly (not implemented yet)

The modifier event looks like this:

    {
      "change": "pressed", // or released
      "modifier": "Mod4"
    }
2016-01-05 02:25:56 +01:00
Mikkel Oscar Lyderik
aa2f754c64 swaybar: Implement binding_mode_indicator 2016-01-03 22:16:36 +01:00
Mikkel Oscar Lyderik
50b04884b6 Trigger ipc_event_workspace in all cases
This makes sure that the workspace IPC event is triggered when needed.

Fixes #382 while making sure that the IPC event is only triggered once.
2015-12-21 23:07:52 +01:00
Mikkel Oscar Lyderik
66c66c7304 Implement barconfig_update IPC event 2015-12-21 15:28:34 +01:00
Drew DeVault
e0cb8284fb Rearrange logging headers
Ref #270
2015-11-28 08:49:02 -05:00
Drew DeVault
27f03c705d Move IPC client into common, refactor IPC 2015-11-27 09:50:04 -05:00