AgeCommit message (Collapse)AuthorFilesLines
2019-03-12config.in: allow launch apps with args via dmenupatch-13ap1-1/+1
Without this change you can't execute apps with command line arguments (e.g. firefox -P profile) because -P will be parsed as argument for "swaymsg exec".
2019-03-11get_deco_rect: fix floaters on tabbed/stacked wsHEADmasterBrian Ashworth1-12/+15
This fixes the decoration rects for floating containers on a workspace that is either tabbed or stacked. Without this, the floater would incorrectly try to calculate where it's tab or stack decorations were on the workspace. This would cause a SIGFPE (due to a divide-by-zero) when the floater was on a tabbed workspace without any tiling children. Furthermore, the floater does not care what the workspace's layout is and should just use the location relative to the workspace. This should have no effect on children of a floating container.
2019-03-11Repair swaynag crash reading message from stdinPeter Grayson1-1/+1
When swaynag is run with the -l/--detailed-message option, a crash may occur if the detailed message read from stdin is large enough. E.g.: swaynag -m hello -l < ~/.config/sway/config The root cause is that the read_from_stdin() function under-allocates memory for the destination buffer which causes that buffer to be overflowed when copying line data to it with snprintf(). The repair is to allocate one more byte for the terminating null byte. N.B. although getline() returns the number of bytes read excluding a terminating null byte, the line buffer is terminated with a null byte. Thus we have a guarantee that the line buffer will be null terminated (which is important when copying with snprintf()).
2019-03-11commands: allow tiled sticky containers to be movedIan Fan1-3/+3
Namely, to a workspace on the same output. However, tiled sticky children of floating containers are still restricted.
2019-03-11Stop using wlr_output->{lx,ly}emersion8-53/+61
Also fixes sway_output->{lx,ly,width,height} not being updated. Also fixes output_get_in_direction adding buffer coords to layout coords.
2019-03-11Fix size_t temporary underflow in log_loaded_themesemersion1-3/+3
`len` will underflow but will overflow right after, so it's not as bad as it may appear. Still better not to under/overflow at all. Fixes https://github.com/swaywm/sway/issues/3862
2019-03-11Fix click behaviourRyan Dwyer1-3/+3
By the time seatop_allows_events was called, seatop_impl was already NULL, causing the function to always return false. This means a press event was sent to clients without a corresponding release event. This patch moves the call to seatop_finish to after the seatop_allows_events check.
2019-03-11Don't send button events to surfaces when dragging or resizingRyan Dwyer4-8/+11
It turns out sending button events during all seat operations is not desirable. This patch introduces a new property `seatop_impl.allows_events` which allows each operation to define whether button events should be passed to the surface or not. The `down` seat operation is the only one that supports this. As all the other seatops don't support it, the calls to seat_pointer_notify_button prior to starting them have been removed.
2019-03-11stringop.c: refactor a few functionsIan Fan1-8/+5
2019-03-11stringop.c: clean up headersIan Fan1-5/+5
2019-03-11stringop.c: remove unused functionsIan Fan3-137/+38
The only use of `join_list` in swaybar/tray/icon.c has been rewritten.
2019-03-11sway_view_child: add listener for view unmapBrian Ashworth2-0/+13
Since not all child views's have an unmap event, it is possible for it to still be mapped (default state) in the destruction handler. When the destruction handler is called, the corresponding view may have already been freed and the memory location reallocated. This adds a listener for the view unmapping and removes the mapped status. This ensures that the child view is damaged due to destruction while the view still exists and not after.
2019-03-10detect_proprietary: use strncmpBrian Ashworth1-1/+1
Only the main nvidia module needs to be blocked. Others such as nvidiafb are benign and do not need to be blocked
2019-03-10fullscreen: init floating on disable without sizeBrian Ashworth1-0/+7
If a container gets mapped as fullscreen and set to floating by criteria, the size and location are never set for the floating container. This adds a check in container_fullscreen_disable for a width or height of 0 and calls container_init_floating
2019-03-10meson: use pkg-config var for scdoc pathemersion1-3/+3
2019-03-10Make raw keysyms take precedence over translatedBen Challenor1-16/+16
Allows both BackSpace and Shift+BackSpace to be bound under the US keyboard layout, per #3705.
2019-03-10Fix crash in cmd_workspace when layer surface has focusemersion2-2/+7
2019-03-10Update language in sway.desktop & sway(1)Drew DeVault2-2/+2
2019-03-10arrange: use int not size_t for title offsetsBrian Ashworth1-2/+2
This changes `apply_tabbed_layout` and `apply_stacked_layout` to use `int` instead of `size_t`. This is necessary for tabbed and stacked containers to be positioned correctly when the y-location is negative. The reasoning for this is signed plus unsigned is always an unsigned value. This was causing the y-location of the container to be positioned near `INT_MIN` due to an unsigned integer underflow
2019-03-10damage: remove output_damage_viewBrian Ashworth1-7/+3
This removes `output_damage_view` since it is unnecessary. The logic has been moved into its only caller `output_damage_from_view`. When damaging the whole view, `output_damage_whole_container` should be used instead
2019-03-10output_damage_whole_container: damage subsurfacesBrian Ashworth1-0/+17
This adds an iterative call in `output_damage_whole_container` to damage the subsurfaces for all visible views that are inside of the container. This is needed to damage subsurfaces that extend outside the box of the container. Without this, those subsurfaces will create artifacts when moving or resizing.
2019-03-09fix "directive argument is null" errorsJeff Peeler2-3/+2
2019-03-09Fix crash when moving window to scratchpadminus1-1/+2
2019-03-08Add missing swaymsg completionsPeter Grayson3-0/+6
The `-m/--monitor` option was missing from the bash and fish completions. The `subscribe` IPC message type was missing from the bash, fish, and zsh completions. Signed-off-by: Peter Grayson <pete@jpgrayson.net>
2019-03-08Add -p/--pretty option to swaymsgPeter Grayson5-5/+17
This new option forces pretty (non-raw/non-JSON) output. By default, when not using a tty, swaymsg outputs using the "raw" format. This makes it impossible to, for example, pipe the pretty output to a pager such as `less` since piping does not use a tty. The new -p/--pretty option gives the user explicit control over the output format while retaining the default tty-dependent behavior. Signed-off-by: Peter Grayson <pete@jpgrayson.net>
2019-03-07ipc: describe libinput device configurationBrian Ashworth3-35/+317
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.
2019-03-06ipc: fix fullscreen deco_rectBrian Ashworth1-2/+3
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
2019-03-06ipc: fix rect for stacked childrenBrian Ashworth1-2/+6
This now takes all titlebars for stacked children into account for the ipc property `rect`
2019-03-06Fix container_parent_layout for scratchpad windowsemersion1-1/+4
2019-03-06ipc: change {,deco_}rect to match i3Brian Ashworth2-11/+45
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.
2019-03-04Set DISPLAY after initializing Xwaylandemersion1-0/+2
This is necessary after https://github.com/swaywm/wlroots/pull/1596
2019-03-04meson: update scdoc requirement to >= 1.9.2Brian Ashworth4-4/+4
Since scdoc 1.9.1 is bugged, this updates the meson version check to >= 1.9.2 and drops the version requirement from the README. This should make it more obvious to users who have 1.9.1 that they need to update scdoc to be able to compile man pages and hopefully cut down on the duplicate issues
2019-03-04Allow concurrent clicksRyan Dwyer2-3/+7
If two cursor buttons are pressed at the same time, the client will now be notified of the second button press. The main reason for not sending the concurrent presses was due to an early return in dispatch_cursor_button if a seatop is in progress. This patch makes it call seat_pointer_notify_button prior to returning. But it also has to make sure there's not a mismatch in events such as a release without a press. Prior to this patch, the down seatop would send press and release events in its begin and finish functions. No other seatops did this. A press event would be sent prior to starting tiling drag, but never an associated release. After this patch, no seatops send their own press or release events. We send them prior to calling the seatop begin functions, then the first part of dispatch_cursor_button handles all presses during seatops and when releasing the seatop.
2019-03-03sway.1.scd: document environment vars set by swayBrian Ashworth1-0/+21
This just documents the few environment variables set by sway in sway.1.scd
2019-03-03render_floating: skip fullscreen floatersBrian Ashworth1-0/+3
If a floater is fullscreen either on a workspace or globally, it should not be rendered on any output is is not fullscreened on. When rendering it on an output it should not be rendered on, there will be an extraneous border along the adjacent side of the output. This adds a check in render_floating to skip all fullscreened floaters
2019-03-03Fixes crash in spawn_swaybg (closes #3733)Noam Preil1-4/+4
2019-03-02floating_maximum_size: change default behaviorBrian Ashworth5-99/+53
This changes the way zero (which is the default) is interpreted for both the width and height of `floating_maximum_size`. It now refers to the width and height of the entire output layout, which matches i3's behavior. This also removes duplicated code to calculate the floating constraints in three files. Before this, `container_init_floating` used two-thirds of the workspace width/height as the max and the entire workspace width/height was used everywhere else. Now, all callers use a single function `floating_calculate_constraints`.
2019-03-02Minor fix of code duplication.hugbubby1-5/+1
Removes 3~ lines of code that didn't need to be restated.
2019-03-01ci: use scdoc-git because 1.9.1 is brokenemersion3-3/+17
2019-03-01meson: check scdoc versionemersion1-2/+3
2019-02-28seat: don't send button release when not pressedemersion8-18/+18
All seat operations except "down" eat the button pressed event and don't send it to clients. Thus, when ending such seat operations we shouldn't send the button released event. This commit moves the logic used to send pressed/released into the "down" operation.
2019-02-28tray: fix pixmap colorsIan Fan1-1/+7
by converting from network byte order to host byte order
2019-02-27Merge pull request #3790 from RedSoxFan/sway-ipc-clarify-window-rectDrew DeVault1-1/+2
sway-ipc.7: clarify window_rect omits decorations
2019-02-27sway-ipc.7: clarify window_rect omits decorationsBrian Ashworth1-1/+2
According to the i3 ipc documentation, `window_rect` excludes the window decorations from the calculation. This just clarifies that in `sway-ipc.7.scd`
2019-02-27Add output dpms to manpageemersion1-6/+9
2019-02-27Merge pull request #3766 from RedSoxFan/sway-ipc-scdocDrew DeVault8-4/+1588
Add sway-ipc.7.scd to document IPC protocol
2019-02-27Merge pull request #3786 from emersion/wlroots-versionDrew DeVault1-1/+3
Set minimum wlroots version
2019-02-27Merge pull request #3787 from emersion/meson-print-featuresDrew DeVault1-5/+18
Print Meson features
2019-02-27Print Meson featuresemersion1-5/+18
2019-02-27Set minimum wlroots versionemersion1-1/+3