commit slurp for openSUSE:Factory

2020-11-05 Thread root
Hello community,

here is the log from the commit of package slurp for openSUSE:Factory checked 
in at 2020-11-05 21:55:55

Comparing /work/SRC/openSUSE:Factory/slurp (Old)
 and  /work/SRC/openSUSE:Factory/.slurp.new.11331 (New)


Package is "slurp"

Thu Nov  5 21:55:55 2020 rev:6 rq:846224 version:1.3.1

Changes:

--- /work/SRC/openSUSE:Factory/slurp/slurp.changes  2020-10-18 
16:33:31.812814190 +0200
+++ /work/SRC/openSUSE:Factory/.slurp.new.11331/slurp.changes   2020-11-05 
21:56:34.295961368 +0100
@@ -1,0 +2,10 @@
+Thu Nov  5 12:49:35 UTC 2020 - Michael Vetter 
+
+- Update to 1.3.1:
+  * Fix off-by-one error in in_box function
+  * Print output into buffer, print result late
+  * Safe printf usage
+  * readme: simplify "select output" example
+  * readme: clarify that -f "%o" prints the output name
+
+---

Old:

  v1.3.0.tar.gz

New:

  v1.3.1.tar.gz



Other differences:
--
++ slurp.spec ++
--- /var/tmp/diff_new_pack.D2wCR5/_old  2020-11-05 21:56:34.855960109 +0100
+++ /var/tmp/diff_new_pack.D2wCR5/_new  2020-11-05 21:56:34.859960100 +0100
@@ -17,7 +17,7 @@
 
 
 Name:   slurp
-Version:1.3.0
+Version:1.3.1
 Release:0
 Summary:Wayland region selector
 License:MIT

++ v1.3.0.tar.gz -> v1.3.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.3.0/README.md new/slurp-1.3.1/README.md
--- old/slurp-1.3.0/README.md   2020-10-16 16:55:45.0 +0200
+++ new/slurp-1.3.1/README.md   2020-11-05 12:19:37.0 +0100
@@ -38,10 +38,10 @@
 slurp -p
 ```
 
-Select an output under Sway, using `swaymsg` and `jq`:
+Select an output and print its name:
 
 ```sh
-swaymsg -t get_outputs | jq -r '.[] | select(.active) | .rect | "\(.x),\(.y) 
\(.width)x\(.height)"' | slurp
+slurp -o -f "%o"
 ```
 
 Select a window under Sway, using `swaymsg` and `jq`:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.3.0/main.c new/slurp-1.3.1/main.c
--- old/slurp-1.3.0/main.c  2020-10-16 16:55:45.0 +0200
+++ new/slurp-1.3.1/main.c  2020-11-05 12:19:37.0 +0100
@@ -32,9 +32,9 @@
 
 static bool in_box(const struct slurp_box *box, int32_t x, int32_t y) {
return box->x <= x
-   && box->x + box->width >= x
+   && box->x + box->width > x
&& box->y <= y
-   && box->y + box->height >= y;
+   && box->y + box->height > y;
 }
 
 static int32_t box_size(const struct slurp_box *box) {
@@ -671,23 +671,23 @@
return res;
 }
 
-static void print_output_name(const struct slurp_box *result, struct wl_list 
*outputs) {
+static void print_output_name(FILE *stream, const struct slurp_box *result, 
struct wl_list *outputs) {
struct slurp_output *output;
wl_list_for_each(output, outputs, link) {
// For now just use the top-left corner
struct slurp_box *geometry = >logical_geometry;
if (in_box(geometry, result->x, result->y)) {
if (geometry->label) {
-   printf("%s", geometry->label);
+   fprintf(stream, "%s", geometry->label);
return;
}
break;
}
}
-   printf("");
+   fprintf(stream, "");
 }
 
-static void print_formatted_result(const struct slurp_box *result, struct 
wl_list *outputs,
+static void print_formatted_result(FILE *stream, const struct slurp_box 
*result, struct wl_list *outputs,
const char *format) {
for (size_t i = 0; format[i] != '\0'; i++) {
char c = format[i];
@@ -697,24 +697,24 @@
i++; // Skip the next character (x, y, w or h)
switch (next) {
case 'x':
-   printf("%d", result->x);
+   fprintf(stream, "%d", result->x);
continue;
case 'y':
-   printf("%d", result->y);
+   fprintf(stream, "%d", result->y);
continue;
case 'w':
-   printf("%d", result->width);
+   fprintf(stream, "%d", result->width);
continue;
case 'h':
-   printf("%d", result->height);
+   fprintf(stream, "%d", result->height);
   

commit slurp for openSUSE:Factory

2020-10-18 Thread root
Hello community,

here is the log from the commit of package slurp for openSUSE:Factory checked 
in at 2020-10-18 16:31:53

Comparing /work/SRC/openSUSE:Factory/slurp (Old)
 and  /work/SRC/openSUSE:Factory/.slurp.new.3486 (New)


Package is "slurp"

Sun Oct 18 16:31:53 2020 rev:5 rq:842187 version:1.3.0

Changes:

--- /work/SRC/openSUSE:Factory/slurp/slurp.changes  2019-06-04 
12:14:29.743779422 +0200
+++ /work/SRC/openSUSE:Factory/.slurp.new.3486/slurp.changes2020-10-18 
16:33:31.812814190 +0200
@@ -1,0 +2,11 @@
+Fri Oct 16 19:26:29 UTC 2020 - Michael Vetter 
+
+- Update to 1.3.0:
+  * Touch input is now supported
+  * The current selection can now be moved by holding the Space key
+  * Choice boxes specified on stdin can now be labelled
+  * A new format option prints the name of the output
+  * The new -o option allows to add all outputs as choice boxes
+  * The new -r option forces the user to select one of the choice boxes
+
+---

Old:

  v1.2.0.tar.gz

New:

  v1.3.0.tar.gz



Other differences:
--
++ slurp.spec ++
--- /var/tmp/diff_new_pack.QskGsR/_old  2020-10-18 16:33:36.980816490 +0200
+++ /var/tmp/diff_new_pack.QskGsR/_new  2020-10-18 16:33:36.984816492 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package slurp
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,12 +12,12 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:   slurp
-Version:1.2.0
+Version:1.3.0
 Release:0
 Summary:Wayland region selector
 License:MIT
@@ -30,6 +30,7 @@
 BuildRequires:  pkgconfig(cairo)
 BuildRequires:  pkgconfig(wayland-client)
 BuildRequires:  pkgconfig(wayland-protocols) >= 1.14
+BuildRequires:  pkgconfig(xkbcommon)
 
 %description
 Tool to select a region in a Wayland compositor.

++ v1.2.0.tar.gz -> v1.3.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.2.0/.build.yml new/slurp-1.3.0/.build.yml
--- old/slurp-1.2.0/.build.yml  2019-06-02 12:07:19.0 +0200
+++ new/slurp-1.3.0/.build.yml  2020-10-16 16:55:45.0 +0200
@@ -4,6 +4,7 @@
   - wayland
   - wayland-protocols
   - cairo
+  - libxkbcommon
 sources:
   - https://github.com/emerison/slurp
 tasks:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.2.0/README.md new/slurp-1.3.0/README.md
--- old/slurp-1.2.0/README.md   2019-06-02 12:07:19.0 +0200
+++ new/slurp-1.3.0/README.md   2020-10-16 16:55:45.0 +0200
@@ -5,17 +5,20 @@
 
 It currently works on Sway 1.0.
 
+Join the IRC channel: ##emersion on Freenode.
+
 ## Building
 
 Install dependencies:
 * meson
 * wayland
 * cairo
+* libxkbcommon
 * scdoc (optional: man pages)
 
 Then run:
 
-```shell
+```sh
 meson build
 ninja -C build
 build/slurp
@@ -44,7 +47,7 @@
 Select a window under Sway, using `swaymsg` and `jq`:
 
 ```sh
-swaymsg -t get_tree | jq -r '.. | (.nodes? // empty)[] | select(.pid and 
.visible) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp
+swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | 
"\(.x),\(.y) \(.width)x\(.height)"' | slurp
 ```
 
 ## Contributing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.2.0/include/slurp.h 
new/slurp-1.3.0/include/slurp.h
--- old/slurp-1.2.0/include/slurp.h 2019-06-02 12:07:19.0 +0200
+++ new/slurp-1.3.0/include/slurp.h 2020-10-16 16:55:45.0 +0200
@@ -9,14 +9,26 @@
 #include "wlr-layer-shell-unstable-v1-client-protocol.h"
 #include "xdg-output-unstable-v1-client-protocol.h"
 
+#define TOUCH_ID_EMPTY -1
+
 struct slurp_box {
int32_t x, y;
int32_t width, height;
+   char *label;
struct wl_list link;
 };
 
+struct slurp_selection {
+   struct slurp_output *current_output;
+   int32_t x, y;
+   int32_t anchor_x, anchor_y;
+   struct slurp_box selection;
+   bool has_selection;
+};
+
 struct slurp_state {
bool running;
+   bool edit_anchor;
 
struct wl_display *display;
struct wl_registry *registry;
@@ -27,15 +39,19 @@
struct wl_list outputs; // slurp_output::link
struct wl_list seats; // slurp_seat::link
 
+   struct xkb_context 

commit slurp for openSUSE:Factory

2019-06-04 Thread root
Hello community,

here is the log from the commit of package slurp for openSUSE:Factory checked 
in at 2019-06-04 12:14:25

Comparing /work/SRC/openSUSE:Factory/slurp (Old)
 and  /work/SRC/openSUSE:Factory/.slurp.new.5148 (New)


Package is "slurp"

Tue Jun  4 12:14:25 2019 rev:4 rq:707381 version:1.2.0

Changes:

--- /work/SRC/openSUSE:Factory/slurp/slurp.changes  2019-02-25 
17:58:40.706218280 +0100
+++ /work/SRC/openSUSE:Factory/.slurp.new.5148/slurp.changes2019-06-04 
12:14:29.743779422 +0200
@@ -1,0 +2,10 @@
+Tue Jun  4 06:12:14 UTC 2019 - mvet...@suse.com
+
+- Update to 1.2.0:
+  * It's now possible to provide a list of predefined
+regions to choose from
+  * A single-pixel selection mode has been added
+  * Check out the README for some examples:
+ https://github.com/emersion/slurp#example-usage
+
+---

Old:

  v1.1.0.tar.gz

New:

  v1.2.0.tar.gz



Other differences:
--
++ slurp.spec ++
--- /var/tmp/diff_new_pack.LrP5BX/_old  2019-06-04 12:14:31.207778942 +0200
+++ /var/tmp/diff_new_pack.LrP5BX/_new  2019-06-04 12:14:31.207778942 +0200
@@ -17,7 +17,7 @@
 
 
 Name:   slurp
-Version:1.1.0
+Version:1.2.0
 Release:0
 Summary:Wayland region selector
 License:MIT

++ v1.1.0.tar.gz -> v1.2.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.1.0/README.md new/slurp-1.2.0/README.md
--- old/slurp-1.1.0/README.md   2019-02-23 19:47:52.0 +0100
+++ new/slurp-1.2.0/README.md   2019-06-02 12:07:19.0 +0200
@@ -21,6 +21,32 @@
 build/slurp
 ```
 
+## Example usage
+
+Select a region and print it to stdout:
+
+```sh
+slurp
+```
+
+Select a single point instead of a region:
+
+```sh
+slurp -p
+```
+
+Select an output under Sway, using `swaymsg` and `jq`:
+
+```sh
+swaymsg -t get_outputs | jq -r '.[] | select(.active) | .rect | "\(.x),\(.y) 
\(.width)x\(.height)"' | slurp
+```
+
+Select a window under Sway, using `swaymsg` and `jq`:
+
+```sh
+swaymsg -t get_tree | jq -r '.. | (.nodes? // empty)[] | select(.pid and 
.visible) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp
+```
+
 ## Contributing
 
 Either [send GitHub pull requests][1] or [send patches on the mailing list][2].
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.1.0/include/slurp.h 
new/slurp-1.2.0/include/slurp.h
--- old/slurp-1.1.0/include/slurp.h 2019-02-23 19:47:52.0 +0100
+++ new/slurp-1.2.0/include/slurp.h 2019-06-02 12:07:19.0 +0200
@@ -12,6 +12,7 @@
 struct slurp_box {
int32_t x, y;
int32_t width, height;
+   struct wl_list link;
 };
 
 struct slurp_state {
@@ -34,6 +35,8 @@
 
uint32_t border_weight;
bool display_dimensions;
+   bool single_point;
+   struct wl_list boxes; // slurp_box::link
 
struct slurp_box result;
 };
@@ -78,8 +81,9 @@
struct slurp_output *current_output;
int32_t x, y;
int32_t pressed_x, pressed_y;
+   struct slurp_box selection;
+   bool has_selection;
 };
 
-void seat_get_box(struct slurp_seat *seat, struct slurp_box *result);
 bool box_intersect(const struct slurp_box *a, const struct slurp_box *b);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.1.0/main.c new/slurp-1.2.0/main.c
--- old/slurp-1.1.0/main.c  2019-02-23 19:47:52.0 +0100
+++ new/slurp-1.2.0/main.c  2019-06-02 12:07:19.0 +0200
@@ -18,10 +18,10 @@
 static void set_output_dirty(struct slurp_output *output);
 
 bool box_intersect(const struct slurp_box *a, const struct slurp_box *b) {
-   return (a->x < b->x + b->width &&
-   a->x + a->width > b->x &&
-   a->y < b->y + b->height &&
-   a->height + a->y > b->y);
+   return a->x < b->x + b->width &&
+   a->x + a->width > b->x &&
+   a->y < b->y + b->height &&
+   a->height + a->y > b->y;
 }
 
 static struct slurp_output *output_from_surface(struct slurp_state *state,
@@ -59,28 +59,67 @@
 }
 
 static void seat_set_outputs_dirty(struct slurp_seat *seat) {
-   struct slurp_box box;
-   seat_get_box(seat, );
struct slurp_output *output;
wl_list_for_each(output, >state->outputs, link) {
-   if (box_intersect(>logical_geometry, )) {
+   if (box_intersect(>logical_geometry, >selection)) 
{
set_output_dirty(output);
}
}
 }
 
+static bool in_box(const struct slurp_box *box, int32_t x, int32_t y) {
+   return box->x <= x
+  

commit slurp for openSUSE:Factory

2019-02-25 Thread root
Hello community,

here is the log from the commit of package slurp for openSUSE:Factory checked 
in at 2019-02-25 17:58:30

Comparing /work/SRC/openSUSE:Factory/slurp (Old)
 and  /work/SRC/openSUSE:Factory/.slurp.new.28833 (New)


Package is "slurp"

Mon Feb 25 17:58:30 2019 rev:3 rq:678842 version:1.1.0

Changes:

--- /work/SRC/openSUSE:Factory/slurp/slurp.changes  2019-02-14 
14:33:52.703638429 +0100
+++ /work/SRC/openSUSE:Factory/.slurp.new.28833/slurp.changes   2019-02-25 
17:58:40.706218280 +0100
@@ -1,0 +2,10 @@
+Mon Feb 25 09:06:57 UTC 2019 - mvet...@suse.com
+
+- Update to 1.1.0:
+  * Add man-pages option like swaywm/sway@ba16f16e4d5a
+  * Display alpha in usage
+  * Add user-defined output formatting (#33)
+  * Abort on escape (#25)
+  * Support selection across multiple outputs (#27)
+
+---

Old:

  v1.0.1.tar.gz

New:

  v1.1.0.tar.gz



Other differences:
--
++ slurp.spec ++
--- /var/tmp/diff_new_pack.P0IhaH/_old  2019-02-25 17:58:43.386215661 +0100
+++ /var/tmp/diff_new_pack.P0IhaH/_new  2019-02-25 17:58:43.390215656 +0100
@@ -17,7 +17,7 @@
 
 
 Name:   slurp
-Version:1.0.1
+Version:1.1.0
 Release:0
 Summary:Wayland region selector
 License:MIT

++ v1.0.1.tar.gz -> v1.1.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.0.1/include/slurp.h 
new/slurp-1.1.0/include/slurp.h
--- old/slurp-1.0.1/include/slurp.h 2019-02-12 21:24:23.0 +0100
+++ new/slurp-1.1.0/include/slurp.h 2019-02-23 19:47:52.0 +0100
@@ -7,6 +7,7 @@
 
 #include "pool-buffer.h"
 #include "wlr-layer-shell-unstable-v1-client-protocol.h"
+#include "xdg-output-unstable-v1-client-protocol.h"
 
 struct slurp_box {
int32_t x, y;
@@ -21,8 +22,8 @@
struct wl_shm *shm;
struct wl_compositor *compositor;
struct zwlr_layer_shell_v1 *layer_shell;
+   struct zxdg_output_manager_v1 *xdg_output_manager;
struct wl_list outputs; // slurp_output::link
-   struct wl_list pointers; // slurp_pointer::link
struct wl_list seats; // slurp_seat::link
 
struct {
@@ -43,11 +44,14 @@
struct wl_list link; // slurp_state::outputs
 
struct slurp_box geometry;
+   struct slurp_box logical_geometry;
int32_t scale;
 
struct wl_surface *surface;
struct zwlr_layer_surface_v1 *layer_surface;
 
+   struct zxdg_output_v1 *xdg_output;
+
struct wl_callback *frame_callback;
bool configured;
bool dirty;
@@ -59,25 +63,23 @@
struct wl_cursor_image *cursor_image;
 };
 
-struct slurp_pointer {
+struct slurp_seat {
+   struct wl_surface *cursor_surface;
struct slurp_state *state;
-   struct wl_pointer *wl_pointer;
-   struct wl_list link; // slurp_state::pointers
+   struct wl_seat *wl_seat;
+   struct wl_list link; // slurp_state::seats
 
-   int32_t x, y;
-   int32_t pressed_x, pressed_y;
+   // keyboard:
+   struct wl_keyboard *wl_keyboard;
+
+   // pointer:
+   struct wl_pointer *wl_pointer;
enum wl_pointer_button_state button_state;
struct slurp_output *current_output;
-
-   struct wl_surface *cursor_surface;
-};
-
-struct slurp_seat {
-   struct wl_seat *wl_seat;
-   struct wl_list link; // slurp_state::seats
+   int32_t x, y;
+   int32_t pressed_x, pressed_y;
 };
 
-void pointer_get_box(struct slurp_pointer *pointer, int *x, int *y,
-   int *width, int *height);
-
+void seat_get_box(struct slurp_seat *seat, struct slurp_box *result);
+bool box_intersect(const struct slurp_box *a, const struct slurp_box *b);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.0.1/main.c new/slurp-1.1.0/main.c
--- old/slurp-1.0.1/main.c  2019-02-12 21:24:23.0 +0100
+++ new/slurp-1.1.0/main.c  2019-02-23 19:47:52.0 +0100
@@ -17,74 +17,89 @@
 
 static void set_output_dirty(struct slurp_output *output);
 
+bool box_intersect(const struct slurp_box *a, const struct slurp_box *b) {
+   return (a->x < b->x + b->width &&
+   a->x + a->width > b->x &&
+   a->y < b->y + b->height &&
+   a->height + a->y > b->y);
+}
+
 static struct slurp_output *output_from_surface(struct slurp_state *state,
struct wl_surface *surface);
 
 static void pointer_handle_enter(void *data, struct wl_pointer *wl_pointer,
uint32_t serial, struct wl_surface *surface,
wl_fixed_t surface_x, wl_fixed_t surface_y) {
-   struct slurp_pointer *pointer = data;
-   struct 

commit slurp for openSUSE:Factory

2019-02-14 Thread root
Hello community,

here is the log from the commit of package slurp for openSUSE:Factory checked 
in at 2019-02-14 14:33:47

Comparing /work/SRC/openSUSE:Factory/slurp (Old)
 and  /work/SRC/openSUSE:Factory/.slurp.new.28833 (New)


Package is "slurp"

Thu Feb 14 14:33:47 2019 rev:2 rq:674530 version:1.0.1

Changes:

--- /work/SRC/openSUSE:Factory/slurp/slurp.changes  2019-02-08 
12:13:34.457465426 +0100
+++ /work/SRC/openSUSE:Factory/.slurp.new.28833/slurp.changes   2019-02-14 
14:33:52.703638429 +0100
@@ -1,0 +2,9 @@
+Wed Feb 13 12:28:30 UTC 2019 - mvet...@suse.com
+
+- Update to 1.0.1:
+  * Mention scdoc as optional dependency
+  * Remove erronous endif
+  * Fix frame callback running after output free
+  * Use linux/input-event-codes.h on FreeBSD
+
+---

Old:

  v1.0.tar.gz

New:

  v1.0.1.tar.gz



Other differences:
--
++ slurp.spec ++
--- /var/tmp/diff_new_pack.DjhxrU/_old  2019-02-14 14:33:55.187637299 +0100
+++ /var/tmp/diff_new_pack.DjhxrU/_new  2019-02-14 14:33:55.191637298 +0100
@@ -12,12 +12,12 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via https://bugs.opensuse.org/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
 
 Name:   slurp
-Version:1.0
+Version:1.0.1
 Release:0
 Summary:Wayland region selector
 License:MIT

++ v1.0.tar.gz -> v1.0.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.0/README.md new/slurp-1.0.1/README.md
--- old/slurp-1.0/README.md 2018-11-22 08:50:30.0 +0100
+++ new/slurp-1.0.1/README.md   2019-02-12 21:24:23.0 +0100
@@ -11,6 +11,7 @@
 * meson
 * wayland
 * cairo
+* scdoc (optional: man pages)
 
 Then run:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.0/include/slurp.h 
new/slurp-1.0.1/include/slurp.h
--- old/slurp-1.0/include/slurp.h   2018-11-22 08:50:30.0 +0100
+++ new/slurp-1.0.1/include/slurp.h 2019-02-12 21:24:23.0 +0100
@@ -48,8 +48,8 @@
struct wl_surface *surface;
struct zwlr_layer_surface_v1 *layer_surface;
 
+   struct wl_callback *frame_callback;
bool configured;
-   bool frame_scheduled;
bool dirty;
int32_t width, height;
struct pool_buffer buffers[2];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/slurp-1.0/main.c new/slurp-1.0.1/main.c
--- old/slurp-1.0/main.c2018-11-22 08:50:30.0 +0100
+++ new/slurp-1.0.1/main.c  2019-02-12 21:24:23.0 +0100
@@ -5,11 +5,7 @@
 #include 
 #include 
 #include 
-#ifdef __linux__
 #include 
-#elif __FreeBSD__
-#include 
-#endif
 
 #include "slurp.h"
 #include "render.h"
@@ -216,6 +212,9 @@
wl_cursor_theme_destroy(output->cursor_theme);
zwlr_layer_surface_v1_destroy(output->layer_surface);
wl_surface_destroy(output->surface);
+   if (output->frame_callback) {
+   wl_callback_destroy(output->frame_callback);
+   }
wl_output_destroy(output->wl_output);
free(output);
 }
@@ -241,9 +240,8 @@
render(output);
 
// Schedule a frame in case the output becomes dirty again
-   struct wl_callback *callback = wl_surface_frame(output->surface);
-   wl_callback_add_listener(callback, _frame_listener, output);
-   output->frame_scheduled = true;
+   output->frame_callback = wl_surface_frame(output->surface);
+   wl_callback_add_listener(output->frame_callback, 
_frame_listener, output);
 
wl_surface_attach(output->surface, output->current_buffer->buffer, 0, 
0);
wl_surface_damage(output->surface, 0, 0, output->width, output->height);
@@ -257,7 +255,7 @@
struct slurp_output *output = data;
 
wl_callback_destroy(callback);
-   output->frame_scheduled = false;
+   output->frame_callback = NULL;
 
if (output->dirty) {
send_frame(output);
@@ -270,14 +268,13 @@
 
 static void set_output_dirty(struct slurp_output *output) {
output->dirty = true;
-   if (output->frame_scheduled) {
+   if (output->frame_callback) {
return;
}
 
-   struct wl_callback *callback = wl_surface_frame(output->surface);
-   wl_callback_add_listener(callback, _frame_listener, output);
+   output->frame_callback = wl_surface_frame(output->surface);
+   wl_callback_add_listener(output->frame_callback, 
_frame_listener, output);