Commit graph

83 commits

Author SHA1 Message Date
Ryan Dwyer 32ba8154b8 Sway clients: Exit gracefully when compositor is unavailable 2018-10-15 21:57:59 +10:00
Arkadiusz Hiler eed0bc3ebd Add support for installing binaries with DT_RPATH
It's better to use DT_RPATH dynamic section of the elf binary to store
the paths of libraries to load instead of overwriting LD_LIBRARY_PATH
for the whole environment, causing surprises. This solution is much more
transparent and perfectly suitable for running contained installations
of wayland/wlroots/sway.

The code unsetting the LD_LIBRARY_PATH/LD_PRELOAD was also deleted as
it's a placebo security at best - we should trust the execution path
that leads us to running sway, and it's way too late to care about those
variables since we already started executing our compositor, thus we
would be compromised anyway.
2018-09-30 15:37:01 +03:00
Brian Ashworth 9ea99a5d36 swaybg: fix increasingly smaller bg on hotplug
render_background_image alters the scale that cairo uses. Depending on
the image mode, resolution, and image size, this may cause the surface
to be rendered increasingly smaller. By calling cairo_save and
cairo_restore, any changes to the cairo settings by the function are
not kept as a side effect.

The surface that swaybg uses is also now cleared before rendering a frame.
This is needed to avoid artifacts on resolution or scale changes with
certain combinations of image modes, resolutions, and image sizes. This
was also part of the increasingly smaller background visual since it
made it so it was not obvious the region being rendered to was smaller
and caused an increasing number of smaller images to be appear for each
hotplug.
2018-09-23 15:17:36 -04:00
Brian Ashworth 43d1ffc9dd Allow a fallback color to be specified for swaybg
This allows for a color to be set when the wallpaper does not fill the
entire output. If specified, the fallback color is also used when the
image path is inaccessible.
2018-08-08 15:37:06 -04:00
minus c73a40555f swaybar/bg: Fix crash on DPMS off
When turning off displays via DPMS, swaybar and swaybg still tried to
render, but did not get a valid buffer, causing them to crash.
2018-07-14 00:04:02 +02:00
emersion 63b4bf5000
Update for swaywm/wlroots#1126 2018-07-09 22:54:30 +01:00
emersion a3ecfcfc2c
swaybg: remove assertions with side-effects 2018-05-07 17:26:21 +01:00
Rostislav Pehlivanov 3b6629af3c Revert "Install swaybar and swaybg under /usr/lib/sway"
This reverts commit f2c209c299.
2018-05-06 00:20:57 +01:00
Rostislav Pehlivanov 2c0c3dc7cc Revert "Make the LIBDIR path configurable"
This reverts commit 1670b46bf6.
2018-05-06 00:19:52 +01:00
Rostislav Pehlivanov 0cdc47ab1e Revert "Meson: Replace option instlibdir with libexecdir"
This reverts commit 830c4ef74c.
2018-05-06 00:19:43 +01:00
Nicolas Braud-Santoni 830c4ef74c Meson: Replace option instlibdir with libexecdir
Derive a value from it, called `rundir` rather than writing join_paths(libexecdir,
'sway') all over the place.
2018-05-05 17:22:46 +02:00
Nicolas Braud-Santoni 1670b46bf6 Make the LIBDIR path configurable 2018-05-05 17:22:46 +02:00
Nicolas Braud-Santoni f2c209c299 Install swaybar and swaybg under /usr/lib/sway 2018-05-05 17:22:46 +02:00
Drew DeVault b32bf595ae Initial swaylock port 2018-04-04 18:47:48 -04:00
Drew DeVault a28730edee Move swaybg background rendering into common/
swaylock will use it too
2018-04-04 18:47:48 -04:00
Drew DeVault 294a33458f
Merge pull request #1710 from emersion/swaybg-empty-input-region
swaybg: set an empty input region
2018-04-03 18:57:02 -04:00
emersion 6929124cef
swaybg: rename w{width,height} to buffer_{width,height} 2018-04-03 16:56:12 -04:00
emersion 9b4f8637a9
swaybg: add HiDPI support 2018-04-03 16:47:06 -04:00
emersion 1382b66217
swaybg: set an empty input region 2018-04-03 15:23:51 -04:00
Drew DeVault 6907a2f2cf Set exclusive zone to -1 for swaybg 2018-03-30 18:29:43 -04:00
Drew DeVault 0c8a64942e Add initial layer shell skeleton 2018-03-28 15:47:22 -04:00
Drew DeVault d39bda76c4 Address review comments 2018-03-28 14:43:23 -04:00
Drew DeVault 653853062f Refactor configure/ack configure/commit flow 2018-03-28 14:25:19 -04:00
Drew DeVault 17e39f6291 s/scaling_mode/background_mode/g
Since it now includes SOLID_COLOR this is a more appropriate name.
2018-03-28 14:25:19 -04:00
Drew DeVault f018d30fe4 Implement image backgrounds 2018-03-28 14:25:19 -04:00
Drew DeVault 632bb948b7 Add solid-color rendering to swaybg 2018-03-28 14:25:19 -04:00
Drew DeVault eccf0b2598 Add client protocols and swaybg skeleton 2018-03-28 14:25:19 -04:00
Tony Crisci d071ff08ae remove the rest of cmake 2017-12-01 05:21:03 -05:00
Linus Heckemann d06ec90a9d swaybg: check that background can be loaded 2017-07-03 22:02:49 +01: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
Zandr Martin 98aa59fdda
implement solid color rendering for swaybg 2016-07-30 18:50:13 -05:00
Drew DeVault 6d971af5c3 Turn swaybg into a shell surface 2016-07-17 11:55:05 -04:00
David Eklov 6d94f77457 Revert "swaybg: Make swaybg a shell surface"
This reverts commit 99bda4afe2.

It turned out that code to handle swaybg as shell surface was broken so we don't
want to make swaybg a shell surface until this has been fixed.
2016-07-14 17:15:31 -05:00
David Eklov 99bda4afe2 swaybg: Make swaybg a shell surface 2016-07-04 21:59:47 -05:00
Tomáš Čech 468ddfb34d Fix missing include paths
When headers were installed in more sofisticated places (but package
config knows it right), it revealed missing paths in CMake
configuration. Lets fix it.
2016-04-28 20:08:41 +02:00
Mikkel Oscar Lyderik 5e253fdd9a Correctly exit sway on errors.
Calling `exit` in sway_terminate prevents sway from correctly shutting
down (freeing data, cleanly terminating the ipc server, etc.).

A better way is to exit straight away if the failure occurs before
`wlc_run` and use sway_abort as usual if it occur when wlc is running.
2016-02-26 09:42:21 +01:00
Mikkel Oscar Lyderik 364e37a1eb Fix whitespace issues. 2016-01-05 23:42:40 +01:00
progandy 21014e606b make gdk-pixbuf dependency really optional 2015-12-20 17:37:52 +01:00
Drew DeVault d2e9c68640 Copy+paste swaybg code to swaylock for testing 2015-12-10 08:18:48 -05:00
Drew DeVault 067ac6cfa7 Discover swaylock extension in registry 2015-12-10 08:05:27 -05:00
Drew DeVault 080a263785 Refactor gdk pixbuf code into shared client lib 2015-12-10 07:57:46 -05:00
Drew DeVault 155f5d2d3e Style enforcement 2015-12-08 07:10:17 -05:00
progandy 3fdf4f811f swaybg: load more image formats with gdk-pixbuf2
travis: added gdk-pixbuf2 dependency
2015-12-07 23:31:44 +01:00
Christoph Gysin cce9c338c0 cmake: build common code only once
This creates (static) libraries for protocols/, common/, and wayland/.
2015-12-02 12:15:57 +02:00
Christoph Gysin c9ce15aa18 cmake: remove subprojects 2015-12-01 22:47:22 +02:00
Christoph Gysin 55b3532fe0 cmake: remove unnecessary quotes 2015-12-01 22:03:53 +02:00
Christoph Gysin 2dedf206d7 cmake: use out-of-source build 2015-12-01 22:03:09 +02:00
Christoph Gysin f7ec3d00a0 cmake: use tabs instead of spaces 2015-12-01 22:03:09 +02:00
Christoph Gysin 905966bcae cmake: style consistency 2015-12-01 22:03:09 +02:00
Christoph Gysin 2429266e3e cmake: convert all cmake commands to lowercase 2015-12-01 22:03:09 +02:00