aboutsummaryrefslogtreecommitdiffstats
path: root/sway/ipc-json.c
Commit message (Collapse)AuthorAge
* Fix crash when moving window to scratchpadLibravatar minus2019-03-11
|
* ipc: describe libinput device configurationLibravatar Brian Ashworth2019-03-11
| | | | | | | | This adds the device configurations to the ipc response for libinput devices. Only supported configuration options for the device will be added. This also moves `libinput_send_events` inside a new `libinput` object that contains the rest of the configuration options. sway-ipc(7) has been updated to reflect the changes and document the new additions.
* ipc: fix fullscreen deco_rectLibravatar Brian Ashworth2019-03-11
| | | | | | This fixes the deco_rect reported by the ipc for fullscreen containers to be all zeroes. Children of the fullscreen container should still have their decorations reported correctly
* ipc: fix rect for stacked childrenLibravatar Brian Ashworth2019-03-11
| | | | | This now takes all titlebars for stacked children into account for the ipc property `rect`
* ipc: change {,deco_}rect to match i3Libravatar Brian Ashworth2019-03-11
| | | | | | | | | | | | This fixes the `deco_rect` and `rect` properties in the IPC responses to match i3's behavior. `deco_rect` should be relative to the parent node, not the current node. This also takes tabbed and stacked decorations into account and will calculate `deco_rect` for all containers since tabbed and stacked child containers will have decorations. `rect` should exclude the window decorations.
* ipc: add missing fields to disabled outputsLibravatar Caleb Bassi2019-02-25
| | | | | | i3 requires all outputs to have certain fields, including 'primary', 'current_workspace', and 'rect' which were missing on disabled outputs. https://i3wm.org/docs/ipc.html#_outputs_reply
* Handle NULL from output_get_active_workspaceLibravatar Brian Ashworth2019-02-25
| | | | | | | | | | This modifies the places where output_get_active_workspace is called to handle a NULL result. Some places already handled it and did not need a change, some just have guard off code blocks, others return errors, and some have sway_asserts since the case should never happen. A lot of this is probably just safety precautions since they probably will never be called when `output_get_active_workspace` is not fully configured with a workspace.
* Add 'visible' key to view json responseLibravatar Yorick van Pelt2019-02-25
|
* ipc: handle unnamed xkb_active_layout_nameLibravatar Brian Ashworth2019-02-11
| | | | | | If the active xkb_layout does not have a name, use `NULL` instead of `json_object_new_string(NULL)`. This also makes it so swaymsg will pretty print this as `(unnamed)`.
* Introduce container_is_scratchpad_hiddenLibravatar Ryan Dwyer2019-01-28
| | | | | | | | | | | | Just a convenience function that improves readability of the code. Other things worth noting: * container_get_siblings and container_sibling_index no longer use the const keyword * container_handle_fullscreen_reparent is only ever called after attaching the container to a workspace, so its con->workspace check has been changed to an assertion
* Implement fullscreen globalLibravatar Ryan Dwyer2019-01-25
|
* Make json-c include respect pkg-config --cflagsLibravatar Jan Beich2019-01-23
| | | | | json-c.pc contains `Cflags: -I${includedir}/json-c`, so `<json-c/json.h>` won't be found unless the parent directory is searched by default.
* bar_cmd_tray_bind: Use mouse button helpersLibravatar Brian Ashworth2019-01-16
| | | | | | | | | | | | | | | | This modifies `bar_cmd_tray_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `bar_cmd_tray_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like with sway bindings, the two commands are encapsulated in a single file to maximize shared code. This also modifies tray bindings to work off of events codes rather than x11 buttons, which allows for any mouse buttons to be used. For `get_bar_config`, `event_code` has been added to the `tray_bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`.
* Merge pull request #3344 from RedSoxFan/bar-mouse-bindings-improvedLibravatar Drew DeVault2019-01-13
|\ | | | | Improve mouse button parsing: bar mouse bindings
| * bar_cmd_bind: utilize mouse button helpersLibravatar Brian Ashworth2019-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This modifies `bar_cmd_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `cmd_bar_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like sway bindings, the two commands are encapsulated in a single file with shared code. This also modifies swaybar to operate off of event codes rather than x11 button numbers, which allows for any mouse button to be used. This introduces two new IPC properties: - For `get_bar_config`, `event_code` has been added to the `bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`. - Likewise for `click_events`, `event` has been added and will include the event code for the button clicked. If the event code can be mapped to a x11 button, `button` will still be the x11 button number. Otherwise, `button` will be `0`.
* | Merge pull request #3398 from RedSoxFan/toggle-input-eventsLibravatar Drew DeVault2019-01-13
|\ \ | | | | | | input events: toggle and ipc get_inputs
| * | get_inputs: add libinput send events modeLibravatar Brian Ashworth2019-01-09
| |/ | | | | | | | | Add `libinput_send_events` to the IPC output for `get_inputs` to allow scripting of mode changes.
* | swaybar: add status_edge_padding commandLibravatar Brian Ashworth2019-01-11
| | | | | | | | | | This adds the bar subcommand `status_edge_padding <padding>` to set the padding used when the status line is on the right edge of the bar.
* | swaybar: add status_padding commandLibravatar Brian Ashworth2019-01-11
|/ | | | | | Adds the bar subcommand `status_padding <padding>` which allows setting the padding used for swaybar. If `status_padding` is set to `0`, blocks will be able to take up the full height of the bar.
* swaybar: implement tray configLibravatar Ian Fan2018-12-31
|
* added fullscreen_mode to get_tree outputLibravatar NokiDev2018-12-25
| | | | Signed-off-by: NokiDev <noki.dev@gmail.com>
* Update for swaywm/wlroots#1377Libravatar Rostislav Pehlivanov2018-12-16
| | | | -Werror is eͫ̐ͭ҉vi͆ͦ̏ͦlͥ̀͒̊͂͛
* Implement bar gapsLibravatar Brian Ashworth2018-11-28
| | | | | | | | | Adds the bar subcommand `gaps <amount>|<horizontal> <vertical>|<top> <right> <bottom> <left>` to set gaps for swaybar. Due to restrictions on margins for a layer_surface, only the sides that are anchored to an edge of the screen can have gaps. Since there is support for per-side outer gaps for workspaces, those should be able to be used instead for the last side.
* IPC: Use consistent function names across ipc-jsonLibravatar Mihai Coman2018-11-26
|
* IPC: Add scratchpad containers to get_tree replyLibravatar Mihai Coman2018-11-26
| | | | | This patch lists all hidden scratchpad containers as floating nodes on "__i3_scratch" workspace. This workspace resides on "__i3" output.
* Merge pull request #3083 from c-edw/feature/StripWorkspaceNameLibravatar emersion2018-11-19
|\ | | | | Implement strip_workspace_name.
| * Implement strip_workspace_name.Libravatar Connor E2018-11-17
| |
* | Use #if instead of #ifdefLibravatar emersion2018-11-18
| |
* | Move view {x,y,width,height} into container structLibravatar Ryan Dwyer2018-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This renames/moves the following properties: * sway_view.{x,y,width,height} -> sway_container.content_{x,y,width,height} * This is required to support placeholder containers as they don't have a view. * sway_container_state.view_{x,y,width,height} -> sway_container_state.content_{x,y,width,height} * To remain consistent with the above. * sway_container_state.con_{x,y,width,height} -> sway_container_state.{x,y,width,height} * The con prefix was there to give it contrast from the view properties, and is no longer useful. The function container_set_geometry_from_floating_view has also been renamed to container_set_geometry_from_content.
* | IPC: Send keyboard layout info in IPC_GET_INPUTSLibravatar Harish Krupo2018-11-12
|/ | | | Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
* ipc: move refresh from output to output->current_modeLibravatar Cole Mickens2018-11-03
|
* fix: restore refresh to the modes_arrayLibravatar Cole Mickens2018-11-03
|
* sway-ipc: includes current_mode for each outputLibravatar Cole Mickens2018-11-03
|
* Move view marks properties to container structLibravatar Ryan Dwyer2018-11-01
| | | | | Like border properties, this will be needed to implement layout saving and restoring.
* ipc: make class, instance, and title window properties optionalLibravatar Franklin "Snaipe" Mathieu2018-10-27
| | | | | | | | | i3 seems to make all window properties, with the exception of transient_for, optional[1]. [1]: https://github.com/i3/i3/blob/315ff17563fd703b2f5117b2ec4d46e89389d323/src/ipc.c#L435-L450 Signed-off-by: Franklin "Snaipe" Mathieu <snaipe@diacritic.io>
* ipc: remove class key from view jsonLibravatar Franklin "Snaipe" Mathieu2018-10-27
| | | | | | | | | It turns out that i3 does not have a `class` key in the json description of a view, but provides it through `window_properties.class`. Since `window_properties` has been added by 8fc9328, we can remove `class` altogether. Signed-off-by: Franklin "Snaipe" Mathieu <snaipe@diacritic.io>
* xwayland: populate window_properties in json for viewsLibravatar Franklin "Snaipe" Mathieu2018-10-23
| | | | | | | | | | | window_properties is documented to contain a subset of the X11 properties of a window (its title, class, instance, role, and transient ID). This commit adds the missing json object from the get_tree output for xwayland windows only. This is a follow-up of #2911. Signed-off-by: Franklin "Snaipe" Mathieu <me@snai.pe>
* Minor refactor of input managerLibravatar Ryan Dwyer2018-10-20
| | | | | | | | | | | | | | | | | | | | | The input manager is a singleton object. Passing the sway_input_manager argument to each of its functions is unnecessary, while removing the argument makes it obvious to the caller that it's a singleton. This patch removes the argument and makes the input manager use server.input instead. On a similar note: * sway_input_manager.server is removed in favour of using the server global. * seat.input is removed because it can get it from server.input. Due to a circular dependency, creating seat0 is now done directly in server_init rather than in input_manager_create. This is because creating seats must be done after server.input is set. Lastly, it now stores the default seat name using a constant and removes a second reference to seat0 (in input_manager_get_default_seat).
* Implement bar bindsymLibravatar Brian Ashworth2018-10-09
|
* swaybar: allow null status_commandLibravatar Ryan Dwyer2018-10-08
| | | | | | | | | Sway sets a default status_command which runs date every second. This patch removes this behaviour so the user can have a NULL status bar if desired. I had to swap swaybar's event_loop_poll and wl_display_flush so that it would map the initial surface.
* ipc: set "type" of floating containers to "floating_con"Libravatar Ian Fan2018-10-06
|
* Merge pull request #2703 from RyanDwyer/csd-borderLibravatar Drew DeVault2018-10-03
|\ | | | | Add CSD to border modes
| * Add CSD to border modesLibravatar Ryan Dwyer2018-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces view.using_csd with a new border mode: B_CSD. This also removes sway_xdg_shell{_v6}_view.deco_mode and view->has_client_side_decorations as we can now get these from the border. You can use `border toggle` to cycle through the modes including CSD, or use `border csd` to set it directly. The client must support the xdg-decoration protocol, and the only client I know of that does is the example in wlroots. If the client switches from SSD to CSD without us expecting it (via the server-decoration protocol), we stash the previous border type into view.saved_border so we can restore it if the client returns to SSD. I haven't found a way to test this though.
* | Turn funcs() into funcs(void)Libravatar Arkadiusz Hiler2018-09-30
|/ | | | If they really do not take undefined number of arguments.
* ipc: add pid information for views in layout treeLibravatar Ian Fan2018-09-19
|
* ipc: handle NULL cases for node_get_outputLibravatar Ian Fan2018-09-15
|
* ipc: add focus information to root nodeLibravatar Ian Fan2018-09-15
|
* code style fixesLibravatar Armin Preiml2018-09-08
|
* get_tree: percent cast to double on divisionLibravatar Armin Preiml2018-09-08
|
* get_tree: default valuesLibravatar Armin Preiml2018-09-08
| | | | | | | | | | Added default values for all nodes, because the i3 get_tree always returns all fields inside the json objects. Add geometry and window for views. Window is only availabel on x11 windows otherwise it's NULL. Calculate percent only if parent is not empty to avoid division by 0.