Commit Graph

317 Commits

Author SHA1 Message Date
Nicolas Cornu
37065cd0c4 add click on title_bar to focus a container 2016-10-06 20:23:46 +02:00
Zandr Martin
7d947fdb95
add unique IDs to containers 2016-09-21 21:05:09 -05:00
Zandr Martin
0516dba3f6
implement "focused container" feature for swaygrab 2016-09-18 16:41:08 -05:00
Zandr Martin
e18b7cdfa9
add global current_focus pointer 2016-09-17 15:54:45 -05:00
Zandr Martin
511eed90cd
squash commits, move enum into resize.c 2016-09-07 06:48:41 -05:00
Drew DeVault
af44154119 Fix constant scale factor in font code 2016-09-05 11:52:52 -04:00
Drew DeVault
b2226ac655 Add client support for HiDPI
This adds HiDPI support to swaybar, swaybg, and swaylock.
2016-09-05 11:36:48 -04:00
Drew DeVault
61184e3208 Initial testing on hidpi clients 2016-09-05 10:32:21 -04:00
Zandr Martin
79ffea328c
Merge branch 'master' of git://github.com/SirCmpwn/sway into commands-refactor 2016-09-02 13:46:19 -05:00
Zandr Martin
b374c35758
refactor commands.c 2016-09-01 21:39:08 -05:00
Drew DeVault
416417a54c Reorganize includes 2016-09-01 08:18:37 -04:00
Tony Crisci
81eb9ea12c Simplify focus setting
Merge the main rendering paths of all containers to make focus setting a bit
simpler and easier to follow.
2016-08-03 23:24:53 -04:00
Tony Crisci
2f65100bee Remove dead global locked_view_focus
The value of `locked_view_focus` is always false. Remove dead code associated
with this variable to simplify things.
2016-08-01 22:25:08 -04:00
Tony Crisci
b39249508f Refactor functions to update container borders
Replace `update_view_border()` with `update_container_border()`. The latter
should handle both the case where the container is a view or if the container
has children.
2016-07-31 20:32:40 -04:00
Tony Crisci
f78d07d39b Implement focus handling for containers
The previous implementation of focus handling assumed that only views can be
focused. Containers can also be focused with a command like `focus parent` or
`focus child`.

Change `set_focused_container()` to handle the case of the given container
being a container with children and update borders accordingly.
2016-07-31 18:10:33 -04:00
Zandr Martin
98aa59fdda
implement solid color rendering for swaybg 2016-07-30 18:50:13 -05:00
D.B
8d0048c8d5 properly hide top border inside tabbed/stacked
When titlebar is hidden, top border of the topmost view inside
tabbed/stacked container will not be drawn. This is changed in layout.c

On the other hand, top border should be drawn sometimes, for example
when titlebar is hidden on a view that is not the topmost inside
tabbed/stacked container. This is changed in border.c
2016-07-30 15:12:34 +02:00
Drew DeVault
11e7ca044c Update hidpi support to latest wlc API 2016-07-28 14:36:49 -04:00
Drew DeVault
6ea02f3064 Initial pass on HiDPI support 2016-07-28 14:36:49 -04:00
Tony Crisci
88b7cbe314 Implement focus child command
The `focus child` command focuses the child container within the selected
container.
2016-07-27 22:48:46 -04:00
Mykyta Holubakha
a2bc6f3bfd Arrange backgrounds only when required 2016-07-21 22:47:35 +03:00
Mykyta Holubakha
2029fef6b8 More progress on window events 2016-07-21 21:51:20 +03:00
Mykyta Holubakha
976e48d79f Initial work on window events 2016-07-21 21:51:20 +03:00
Mykyta Holubakha
0b5391ed77 Properly construct event bitmasks 2016-07-20 00:47:57 +03:00
Drew DeVault
6d971af5c3 Turn swaybg into a shell surface 2016-07-17 11:55:05 -04:00
Drew DeVault
3bb880bf20 Implement configurable wrapping on bar ws scroll 2016-07-17 11:26:38 -04:00
D.B
ad7605675e refactor swayc_tabbed_stacked_parent into _ancestor and _parent and use where needed 2016-07-16 15:34:43 +02:00
Drew DeVault
147a88260a Fix #753 2016-07-16 09:09:22 -04:00
David Eklov
c0b7610c26 Enable windows to register to get notified when the mouse wheel is scrolled 2016-07-15 19:14:31 -05:00
David Eklov
250ddc66c6 Rename pointer_input::notify to indicate that is called on button clicks 2016-07-15 19:14:31 -05:00
David Eklov
a0c8799c80 Compute what workspace button is clicked
This commit does not do anything with this information other than logging it.
2016-07-14 17:18:01 -05:00
David Eklov
679c7b397c Use int instead of wl_fixed_t for mouse coordinates 2016-07-14 17:18:01 -05:00
David Eklov
c805e42635 Extract workspace size computation from render_workspace_button()
Also remove some unnecessary strtup()s and rename a few variables and functions.
2016-07-14 17:18:01 -05:00
David Eklov
5c4f52f953 Set panels' geometries correctly and don't render them explicitly
Panels were explicitly rendered by calling wlc_surface_render in
handle_output_pre_render. Calling wlc_surface_render does not set the
surface's geometry (like wlc_view_set_geometry does). Sway did not call
wlc_view_set_geometry for panels, so wlc defaulted their geometry to be at
the origin. This is not correct for bars unless their location is top.

Furthermore, for a surface to receive pointer events, its mask has to be
set to visible. This causes wlc to render these surfaces, causing panels
and backgrounds to be rendered twice.

This commit makes panels and surfaces visible, sets the correct geometries
and removes the code that explicitly rendered them.
2016-07-14 17:18:01 -05:00
David Eklov
4bb45abc46 Don't treat backgrounds as shell surfaces
This code had some issues. Remove it now so that we can start clean and fix
it later.
2016-07-14 17:15:31 -05:00
Mykyta Holubakha
c503bf1342 Suspend destruction of wss when creating views 2016-07-15 00:22:53 +03:00
D.B
ee67cd0ba1 Fix tabbed/stacked corner case #742
Tabbed/stacked containers are now created only if a view is present on
the workspace. If a view is created on previously empty tabbed/stacked
workspace, it gets wrapped in a container.
2016-07-07 22:28:57 +02:00
David Eklov
b9d8cbabdd Fix formatting guide violations (spaces instead of tabs) 2016-07-06 01:08:54 -05:00
David Eklov
c8a64305fd Enable windows to register to get notified of pointer button events 2016-07-06 01:03:04 -05:00
David Eklov
d9bcea381a Fix formatting guide violations (spaces instead of tabs) 2016-07-04 22:18:56 -05:00
David Eklov
bb35960e65 Move code to make a window a shell surface into seperate function 2016-07-04 21:58:41 -05:00
David Eklov
51204b33c1 Enable backgrounds and panels to be shell surfaces
Prior to this commit all windows (e.g. shell surfaces) were handled the same
way in handle_view_created. Since backgrounds and panels have to be treated
differently, they could not be shell surfaces. This changes checks whether
a client is a background or a panel in handle_view_created and exists to
let them be dealt with elsewhere.
2016-07-04 21:58:07 -05:00
Zandr Martin
e07b8c8d7c Merge branch 'master' into get-tree-command 2016-07-04 13:53:49 -05:00
Zandr Martin
15a324b0d3
implement get_tree command 2016-07-04 13:34:44 -05:00
Zandr Martin
a7b94f1324
typo in focus.h 2016-07-03 12:22:10 -05:00
Zandr Martin
d5e4fff345
resize command updates (#713) 2016-07-03 12:11:21 -05:00
David Eklov
26842ff383 Add get_log_level() to encapsulate v (current log level)
This patch also makes all global variable in log.c static.
2016-06-27 18:56:50 -05:00
Zandr Martin
889618d3ee
implement resize command for absolute dimensions 2016-06-11 17:02:16 -05:00
Zandr Martin
2298143d09
cleanup + add timeouts for pid_workspace list 2016-06-11 12:43:34 -05:00
Zandr Martin
beaa03344e
clean up pid/workspace stuff 2016-06-11 09:20:09 -05:00