Merge remote-tracking branch 'upstream/master' into add-tabbed-windows

This commit is contained in:
Dudemanguy911 2018-05-08 12:40:12 -05:00
commit 767640aa06
3 changed files with 14 additions and 7 deletions

View file

@ -36,7 +36,7 @@ gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: false)
pixman = dependency('pixman-1') pixman = dependency('pixman-1')
libcap = dependency('libcap') libcap = dependency('libcap')
libinput = dependency('libinput', version: '>=1.6.0') libinput = dependency('libinput', version: '>=1.6.0')
libpam = cc.find_library('libpam') libpam = cc.find_library('pam')
math = cc.find_library('m') math = cc.find_library('m')
rt = cc.find_library('rt') rt = cc.find_library('rt')
git = find_program('git', required: false) git = find_program('git', required: false)

View file

@ -47,12 +47,16 @@
or manipulate a buffer prior to the first layer_surface.configure call or manipulate a buffer prior to the first layer_surface.configure call
must also be treated as errors. must also be treated as errors.
You may pass NULL for output to allow the compositor to decide which
output to use. Generally this will be the one that the user most
recently interacted with.
Clients can specify a namespace that defines the purpose of the layer Clients can specify a namespace that defines the purpose of the layer
surface. surface.
</description> </description>
<arg name="id" type="new_id" interface="zwlr_layer_surface_v1"/> <arg name="id" type="new_id" interface="zwlr_layer_surface_v1"/>
<arg name="surface" type="object" interface="wl_surface"/> <arg name="surface" type="object" interface="wl_surface"/>
<arg name="output" type="object" interface="wl_output"/> <arg name="output" type="object" interface="wl_output" allow-null="true"/>
<arg name="layer" type="uint" enum="layer" summary="layer to add this surface to"/> <arg name="layer" type="uint" enum="layer" summary="layer to add this surface to"/>
<arg name="namespace" type="string" summary="namespace for the layer surface"/> <arg name="namespace" type="string" summary="namespace for the layer surface"/>
</request> </request>

View file

@ -113,7 +113,7 @@ static void layer_surface_closed(void *data,
state->run_display = false; state->run_display = false;
} }
struct zwlr_layer_surface_v1_listener layer_surface_listener = { static const struct zwlr_layer_surface_v1_listener layer_surface_listener = {
.configure = layer_surface_configure, .configure = layer_surface_configure,
.closed = layer_surface_closed, .closed = layer_surface_closed,
}; };
@ -141,7 +141,7 @@ static void output_scale(void *data, struct wl_output *output, int32_t factor) {
} }
} }
struct wl_output_listener output_listener = { static const struct wl_output_listener output_listener = {
.geometry = output_geometry, .geometry = output_geometry,
.mode = output_mode, .mode = output_mode,
.done = output_done, .done = output_done,
@ -203,7 +203,8 @@ int main(int argc, const char **argv) {
return 1; return 1;
} }
assert(state.display = wl_display_connect(NULL)); state.display = wl_display_connect(NULL);
assert(state.display);
struct wl_registry *registry = wl_display_get_registry(state.display); struct wl_registry *registry = wl_display_get_registry(state.display);
wl_registry_add_listener(registry, &registry_listener, &state); wl_registry_add_listener(registry, &registry_listener, &state);
@ -213,9 +214,11 @@ int main(int argc, const char **argv) {
// Second roundtrip to get output properties // Second roundtrip to get output properties
wl_display_roundtrip(state.display); wl_display_roundtrip(state.display);
assert(state.surface = wl_compositor_create_surface(state.compositor)); state.surface = wl_compositor_create_surface(state.compositor);
assert(state.surface);
assert(state.input_region = wl_compositor_create_region(state.compositor)); state.input_region = wl_compositor_create_region(state.compositor);
assert(state.input_region);
wl_surface_set_input_region(state.surface, state.input_region); wl_surface_set_input_region(state.surface, state.input_region);
state.layer_surface = zwlr_layer_shell_v1_get_layer_surface( state.layer_surface = zwlr_layer_shell_v1_get_layer_surface(