Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package bemenu for openSUSE:Factory checked 
in at 2022-10-08 01:24:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bemenu (Old)
 and      /work/SRC/openSUSE:Factory/.bemenu.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bemenu"

Sat Oct  8 01:24:59 2022 rev:16 rq:1008679 version:0.6.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/bemenu/bemenu.changes    2022-07-06 
15:42:36.218570472 +0200
+++ /work/SRC/openSUSE:Factory/.bemenu.new.2275/bemenu.changes  2022-10-08 
01:25:04.358208688 +0200
@@ -1,0 +2,14 @@
+Fri Oct  7 07:25:20 UTC 2022 - Michael Vetter <mvet...@suse.com>
+
+- Update to 0.6.11:
+  * Trigger pointer selection on button release instead #281
+  * Do not highlight entry with initial mouse position #282
+  * Document alternating color argument in man page as well #283
+  * Fix exiting when an unexpected Wayland error occurs. #287
+  * wayland: Damage using buffer coordinates #293
+  * wayland: Bump version #296
+  * fix ignored --monitor in BEMENU_OPTS env var #303
+  * Add --accept-single flag #304
+  * Document feedback color argument in man page as well #307
+
+-------------------------------------------------------------------

Old:
----
  bemenu-0.6.10.tar.gz

New:
----
  bemenu-0.6.11.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bemenu.spec ++++++
--- /var/tmp/diff_new_pack.ankWIt/_old  2022-10-08 01:25:04.818209744 +0200
+++ /var/tmp/diff_new_pack.ankWIt/_new  2022-10-08 01:25:04.822209753 +0200
@@ -18,7 +18,7 @@
 
 %define bcond_with curses
 Name:           bemenu
-Version:        0.6.10
+Version:        0.6.11
 Release:        0
 Summary:        Dynamic menu library and client program inspired by dmenu
 License:        MIT

++++++ bemenu-0.6.10.tar.gz -> bemenu-0.6.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/README.md new/bemenu-0.6.11/README.md
--- old/bemenu-0.6.10/README.md 2022-07-06 10:11:27.000000000 +0200
+++ new/bemenu-0.6.11/README.md 2022-10-07 06:56:13.000000000 +0200
@@ -48,6 +48,8 @@
 
 ## OSX
 
+### Homebrew
+
 ```sh
 # Make sure you have GNU Make and pkg-config installed
 brew install make pkg-config
@@ -59,6 +61,15 @@
 # Other than that, follow the normal build steps, but use `build-osx.sh` 
instead of make
 ```
 
+### Nix
+
+There is darwin.nix provided in this repo, you can install bemenu with it by 
running
+```sh
+nix-env -i -f darwin.nix
+```
+
+This installs only the curses backend.
+
 ## Dependencies
 
 - C compiler
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/VERSION new/bemenu-0.6.11/VERSION
--- old/bemenu-0.6.10/VERSION   2022-07-06 10:11:27.000000000 +0200
+++ new/bemenu-0.6.11/VERSION   2022-10-07 06:56:13.000000000 +0200
@@ -1 +1 @@
-0.6.10
+0.6.11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/client/bemenu-run.c 
new/bemenu-0.6.11/client/bemenu-run.c
--- old/bemenu-0.6.10/client/bemenu-run.c       2022-07-06 10:11:27.000000000 
+0200
+++ new/bemenu-0.6.11/client/bemenu-run.c       2022-10-07 06:56:13.000000000 
+0200
@@ -10,6 +10,7 @@
 static struct client client = {
     .filter_mode = BM_FILTER_MODE_DMENU,
     .title = "bemenu-run",
+    .monitor = -1,
 };
 
 struct paths {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/client/bemenu.c 
new/bemenu-0.6.11/client/bemenu.c
--- old/bemenu-0.6.10/client/bemenu.c   2022-07-06 10:11:27.000000000 +0200
+++ new/bemenu-0.6.11/client/bemenu.c   2022-10-07 06:56:13.000000000 +0200
@@ -7,6 +7,7 @@
 static struct client client = {
     .filter_mode = BM_FILTER_MODE_DMENU,
     .title = "bemenu",
+    .monitor = -1,
 };
 
 static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/client/common/common.c 
new/bemenu-0.6.11/client/common/common.c
--- old/bemenu-0.6.10/client/common/common.c    2022-07-06 10:11:27.000000000 
+0200
+++ new/bemenu-0.6.11/client/common/common.c    2022-10-07 06:56:13.000000000 
+0200
@@ -179,6 +179,7 @@
           " -x, --password        hide input.\n"
           " -s, --no-spacing      disable the title spacing on entries.\n"
           " --scrollbar           display scrollbar. (none (default), always, 
autohide)\n"
+          " --accept-single       immediately return if there is only one 
item.\n"
           " --ifne                only display menu if there are items.\n"
           " --fork                always fork. (bemenu-run)\n"
           " --no-exec             do not execute command. (bemenu-run)\n\n"
@@ -265,6 +266,7 @@
         { "prefix",       required_argument, 0, 'P' },
         { "password",     no_argument,       0, 'x' },
         { "scrollbar",    required_argument, 0, 0x100 },
+        { "accept-single",no_argument,       0, 0x11a },
         { "ifne",         no_argument,       0, 0x117 },
         { "fork",         no_argument,       0, 0x118 },
         { "no-exec",      no_argument,       0, 0x119 },
@@ -309,9 +311,6 @@
      * Either break the interface and make them --sf, --sb (like they are now),
      * or parse them before running getopt.. */
 
-    /* Set default monitor index to -1 (maybe be overwritten with -m below). */
-    client->monitor = -1;
-
     for (optind = 0;;) {
         int32_t opt;
 
@@ -353,6 +352,9 @@
             case 0x100:
                 client->scrollbar = (!strcmp(optarg, "none") ? 
BM_SCROLLBAR_NONE : (!strcmp(optarg, "always") ? BM_SCROLLBAR_ALWAYS : 
(!strcmp(optarg, "autohide") ? BM_SCROLLBAR_AUTOHIDE : BM_SCROLLBAR_NONE)));
                 break;
+            case 0x11a:
+                client->accept_single = true;
+                break;
             case 0x117:
                 client->ifne = true;
                 break;
@@ -543,20 +545,35 @@
 enum bm_run_result
 run_menu(const struct client *client, struct bm_menu *menu, void 
(*item_cb)(const struct client *client, struct bm_item *item))
 {
+    {
+    uint32_t total_item_count;
+    struct bm_item **items = bm_menu_get_items(menu, &total_item_count);
+
+    if (client->ifne && total_item_count == 0) {
+        return BM_RUN_RESULT_CANCEL;
+    }
+
+    if (client->accept_single && total_item_count == 1) {
+        item_cb(client, *items);
+        return BM_RUN_RESULT_SELECTED;
+    }
+
+    }
+
     bm_menu_set_highlighted_index(menu, client->selected);
     bm_menu_grab_keyboard(menu, true);
     bm_menu_set_filter(menu, client->initial_filter);
 
-    if (client->ifne && !bm_menu_get_items(menu, NULL))
-        return BM_RUN_RESULT_CANCEL;
-
     uint32_t unicode;
     enum bm_key key;
     struct bm_pointer pointer;
     struct bm_touch touch;
     enum bm_run_result status = BM_RUN_RESULT_RUNNING;
     do {
-        bm_menu_render(menu);
+        if (!bm_menu_render(menu)) {
+            status = BM_RUN_RESULT_CANCEL;
+            break;
+        }
         key = bm_menu_poll_key(menu, &unicode);
         pointer = bm_menu_poll_pointer(menu);
         touch = bm_menu_poll_touch(menu);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/client/common/common.h 
new/bemenu-0.6.11/client/common/common.h
--- old/bemenu-0.6.10/client/common/common.h    2022-07-06 10:11:27.000000000 
+0200
+++ new/bemenu-0.6.11/client/common/common.h    2022-10-07 06:56:13.000000000 
+0200
@@ -26,6 +26,7 @@
     bool center;
     bool grab;
     bool wrap;
+    bool accept_single;
     bool ifne;
     bool no_overlap;
     bool no_spacing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/darwin.nix new/bemenu-0.6.11/darwin.nix
--- old/bemenu-0.6.10/darwin.nix        1970-01-01 01:00:00.000000000 +0100
+++ new/bemenu-0.6.11/darwin.nix        2022-10-07 06:56:13.000000000 +0200
@@ -0,0 +1,31 @@
+{ pkgs ? import <nixpkgs> {} }:
+
+pkgs.stdenv.mkDerivation rec {
+  name = "bemenu";
+  src = ./.;
+  nativeBuildInputs = with pkgs; [ pkg-config scdoc ];
+  buildInputs = with pkgs; [ ncurses ];
+
+  postPatch = ''
+    substituteInPlace GNUmakefile --replace '-soname' '-install_name'
+  '';
+
+  makeFlags = ["PREFIX=$(out)"];
+  buildFlags = ["PREFIX=$(out)" "clients" "curses"];
+
+  # 
https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/setup-hooks/fix-darwin-dylib-names.sh
+  # ^ does not handle .so files
+  postInstall = ''
+    so="$(find "$out/lib" -name "libbemenu.so.[0-9]" -print -quit)"
+    for f in "$out/bin/"*; do
+        install_name_tool -change "$(basename $so)" "$so" $f
+    done
+  '';
+
+  meta = with pkgs.lib; {
+    homepage = "https://github.com/Cloudef/bemenu";;
+    description = "Dynamic menu library and client program inspired by dmenu";
+    license = licenses.gpl3Plus;
+    platforms = with platforms; darwin;
+  };
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/lib/bemenu.h 
new/bemenu-0.6.11/lib/bemenu.h
--- old/bemenu-0.6.10/lib/bemenu.h      2022-07-06 10:11:27.000000000 +0200
+++ new/bemenu-0.6.11/lib/bemenu.h      2022-10-07 06:56:13.000000000 +0200
@@ -933,7 +933,7 @@
  *
  * @param menu bm_menu instance to be rendered.
  */
-BM_PUBLIC void bm_menu_render(struct bm_menu *menu);
+BM_PUBLIC bool bm_menu_render(struct bm_menu *menu);
 
 /**
  * Trigger filtering of menu manually.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/lib/internal.h 
new/bemenu-0.6.11/lib/internal.h
--- old/bemenu-0.6.10/lib/internal.h    2022-07-06 10:11:27.000000000 +0200
+++ new/bemenu-0.6.11/lib/internal.h    2022-10-07 06:56:13.000000000 +0200
@@ -103,7 +103,7 @@
     /**
      * Tells underlying renderer to draw the menu.
      */
-    void (*render)(struct bm_menu *menu);
+    bool (*render)(struct bm_menu *menu);
 
     /**
      * Set vertical alignment of the bar.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/lib/menu.c new/bemenu-0.6.11/lib/menu.c
--- old/bemenu-0.6.10/lib/menu.c        2022-07-06 10:11:27.000000000 +0200
+++ new/bemenu-0.6.11/lib/menu.c        2022-10-07 06:56:13.000000000 +0200
@@ -723,13 +723,15 @@
     return list_get_items(&menu->items, out_nmemb);
 }
 
-void
+bool
 bm_menu_render(struct bm_menu *menu)
 {
     assert(menu);
 
     if (menu->renderer->api.render)
-        menu->renderer->api.render(menu);
+        return menu->renderer->api.render(menu);
+
+    return true;
 }
 
 void
@@ -1170,7 +1172,7 @@
                 menu_prev(menu, count, menu->wrap);
             }
         }
-        if (pointer.event_mask & POINTER_EVENT_BUTTON && pointer.state == 
POINTER_STATE_PRESSED) {
+        if (pointer.event_mask & POINTER_EVENT_BUTTON && pointer.state == 
POINTER_STATE_RELEASED) {
             switch (pointer.button) {
                 case BM_POINTER_KEY_PRIMARY:
                     {
@@ -1192,11 +1194,11 @@
         }
     }
 
-    if (pointer.event_mask & (POINTER_EVENT_ENTER | POINTER_EVENT_MOTION)) {
+    if (pointer.event_mask & POINTER_EVENT_MOTION) {
         menu_point_select(menu, pointer.pos_x, pointer.pos_y, displayed);
     }
 
-    if (pointer.event_mask & POINTER_EVENT_BUTTON && pointer.state == 
POINTER_STATE_PRESSED) {
+    if (pointer.event_mask & POINTER_EVENT_BUTTON && pointer.state == 
POINTER_STATE_RELEASED) {
         switch (pointer.button) {
             case BM_POINTER_KEY_PRIMARY:
                 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/lib/renderers/curses/curses.c 
new/bemenu-0.6.11/lib/renderers/curses/curses.c
--- old/bemenu-0.6.10/lib/renderers/curses/curses.c     2022-07-06 
10:11:27.000000000 +0200
+++ new/bemenu-0.6.11/lib/renderers/curses/curses.c     2022-10-07 
06:56:13.000000000 +0200
@@ -176,7 +176,7 @@
         attroff(COLOR_PAIR(pair));
 }
 
-static void
+static bool
 render(struct bm_menu *menu)
 {
     if (curses.should_terminate) {
@@ -190,7 +190,7 @@
         setlocale(LC_CTYPE, "");
 
         if ((curses.stdscreen = initscr()) == NULL)
-            return;
+            return true;
 
         set_escdelay(25);
         flushinp();
@@ -280,6 +280,8 @@
         restore_stdin();
         curses.should_terminate = true;
     }
+
+    return true;
 }
 
 static uint32_t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/lib/renderers/wayland/registry.c 
new/bemenu-0.6.11/lib/renderers/wayland/registry.c
--- old/bemenu-0.6.10/lib/renderers/wayland/registry.c  2022-07-06 
10:11:27.000000000 +0200
+++ new/bemenu-0.6.11/lib/renderers/wayland/registry.c  2022-10-07 
06:56:13.000000000 +0200
@@ -603,7 +603,7 @@
     struct wayland *wayland = data;
 
     if (strcmp(interface, "wl_compositor") == 0) {
-        wayland->compositor = wl_registry_bind(registry, id, 
&wl_compositor_interface, 3);
+        wayland->compositor = wl_registry_bind(registry, id, 
&wl_compositor_interface, 4);
     } else if (strcmp(interface, zwlr_layer_shell_v1_interface.name) == 0) {
         wayland->layer_shell = wl_registry_bind(registry, id, 
&zwlr_layer_shell_v1_interface, 2);
     } else if (strcmp(interface, "wl_seat") == 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/lib/renderers/wayland/wayland.c 
new/bemenu-0.6.11/lib/renderers/wayland/wayland.c
--- old/bemenu-0.6.10/lib/renderers/wayland/wayland.c   2022-07-06 
10:11:27.000000000 +0200
+++ new/bemenu-0.6.11/lib/renderers/wayland/wayland.c   2022-10-07 
06:56:13.000000000 +0200
@@ -23,14 +23,12 @@
     wl_display_flush(wayland->display);
 }
 
-static void
+static bool
 wait_for_events(struct wayland *wayland) {
     wl_display_dispatch_pending(wayland->display);
 
-    if (wl_display_flush(wayland->display) < 0 && errno != EAGAIN) {
-        wayland->input.sym = XKB_KEY_Escape;
-        return;
-    }
+    if (wl_display_flush(wayland->display) < 0 && errno != EAGAIN)
+        return false;
 
     struct epoll_event ep[16];
     uint32_t num = epoll_wait(efd, ep, 16, -1);
@@ -38,11 +36,13 @@
         if (ep[i].data.ptr == &wayland->fds.display) {
             if (ep[i].events & EPOLLERR || ep[i].events & EPOLLHUP ||
                ((ep[i].events & EPOLLIN) && 
wl_display_dispatch(wayland->display) < 0))
-                wayland->input.sym = XKB_KEY_Escape;
+                return false;
         } else if (ep[i].data.ptr == &wayland->fds.repeat) {
             bm_wl_repeat(wayland);
         }
     }
+
+    return true;
 }
 
 static void
@@ -62,14 +62,17 @@
     menu->dirty = false;
 }
 
-static void
+static bool
 render(struct bm_menu *menu)
 {
     struct wayland *wayland = menu->renderer->internal;
 
     schedule_windows_render_if_dirty(menu, wayland);
-    wait_for_events(wayland);
+    if (!wait_for_events(wayland))
+        return false;
     render_windows_if_pending(menu, wayland);
+
+    return true;
 }
 
 static enum bm_key
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/lib/renderers/wayland/window.c 
new/bemenu-0.6.11/lib/renderers/wayland/window.c
--- old/bemenu-0.6.10/lib/renderers/wayland/window.c    2022-07-06 
10:11:27.000000000 +0200
+++ new/bemenu-0.6.11/lib/renderers/wayland/window.c    2022-10-07 
06:56:13.000000000 +0200
@@ -262,7 +262,7 @@
         destroy_buffer(buffer);
     }
 
-    wl_surface_damage(window->surface, 0, 0, buffer->width, buffer->height);
+    wl_surface_damage_buffer(window->surface, 0, 0, buffer->width, 
buffer->height);
     wl_surface_attach(window->surface, buffer->buffer, 0, 0);
     wl_surface_commit(window->surface);
     buffer->busy = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/lib/renderers/x11/x11.c 
new/bemenu-0.6.11/lib/renderers/x11/x11.c
--- old/bemenu-0.6.10/lib/renderers/x11/x11.c   2022-07-06 10:11:27.000000000 
+0200
+++ new/bemenu-0.6.11/lib/renderers/x11/x11.c   2022-10-07 06:56:13.000000000 
+0200
@@ -6,7 +6,7 @@
 #include <unistd.h>
 #include <X11/Xutil.h>
 
-static void
+static bool
 render(struct bm_menu *menu)
 {
     struct x11 *x11 = menu->renderer->internal;
@@ -16,7 +16,7 @@
 
     XEvent ev;
     if (XNextEvent(x11->display, &ev) || XFilterEvent(&ev, 
x11->window.drawable))
-        return;
+        return true;
 
     switch (ev.type) {
         case KeyPress:
@@ -32,6 +32,8 @@
             }
             break;
     }
+
+    return true;
 }
 
 static enum bm_key
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/bemenu-0.6.10/man/bemenu.1.scd.in 
new/bemenu-0.6.11/man/bemenu.1.scd.in
--- old/bemenu-0.6.10/man/bemenu.1.scd.in       2022-07-06 10:11:27.000000000 
+0200
+++ new/bemenu-0.6.11/man/bemenu.1.scd.in       2022-10-07 06:56:13.000000000 
+0200
@@ -148,10 +148,18 @@
 
 *--hf* <_color_>       Highlighted foreground.
 
+*--fbb* <_color_>      Feedback background.
+
+*--fbf* <_color_>      Feedback foreground.
+
 *--sb* <_color_>       Selected background.
 
 *--sf* <_color_>       Selected foreground.
 
+*--ab* <_color_>       Alternating background color.
+
+*--af* <_color_>       Alternating foreground color.
+
 *--scb* <_color_>      Scrollbar background.
 
 *--scf* <_color_>      Scrollbar foreground.

Reply via email to