Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package alttab for openSUSE:Factory checked 
in at 2021-12-07 00:00:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/alttab (Old)
 and      /work/SRC/openSUSE:Factory/.alttab.new.31177 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "alttab"

Tue Dec  7 00:00:05 2021 rev:6 rq:935977 version:1.6.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/alttab/alttab.changes    2021-03-15 
10:56:34.433371856 +0100
+++ /work/SRC/openSUSE:Factory/.alttab.new.31177/alttab.changes 2021-12-07 
00:01:24.264135304 +0100
@@ -1,0 +2,7 @@
+Mon Dec  6 10:47:34 UTC 2021 - Michael Vetter <[email protected]>
+
+- Update to 1.6.1:
+  * Vertical layout.
+  * Extra border around the alttab window.
+
+-------------------------------------------------------------------

Old:
----
  v1.6.0.tar.gz

New:
----
  v1.6.1.tar.gz

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

Other differences:
------------------
++++++ alttab.spec ++++++
--- /var/tmp/diff_new_pack.xI0t9T/_old  2021-12-07 00:01:24.984132757 +0100
+++ /var/tmp/diff_new_pack.xI0t9T/_new  2021-12-07 00:01:24.992132729 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           alttab
-Version:        1.6.0
+Version:        1.6.1
 Release:        0
 Summary:        Task Switcher
 License:        GPL-3.0-only

++++++ v1.6.0.tar.gz -> v1.6.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alttab-1.6.0/ChangeLog new/alttab-1.6.1/ChangeLog
--- old/alttab-1.6.0/ChangeLog  2021-03-14 17:10:47.000000000 +0100
+++ new/alttab-1.6.1/ChangeLog  2021-12-06 00:22:57.000000000 +0100
@@ -1,3 +1,15 @@
+2021-12-06  Alexander Kulak  <[email protected]>
+
+       version 1.6.1
+
+2021-09-12  Futa Miyachi  <[email protected]>
+
+       Vertical layout.
+
+2021-08-15  Aleksandrs Stier  <[email protected]>
+
+       Extra border around the alttab window.
+
 2021-03-14  Alexander Kulak  <[email protected]>
 
        version 1.6.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alttab-1.6.0/INSTALL.md new/alttab-1.6.1/INSTALL.md
--- old/alttab-1.6.0/INSTALL.md 2021-03-14 17:10:47.000000000 +0100
+++ new/alttab-1.6.1/INSTALL.md 2021-12-06 00:22:57.000000000 +0100
@@ -39,12 +39,12 @@
 --------------------
 
 1. Install build dependencies.
-    Basic Xlib, Xft, Xrender, Xrandr, libpng libraries
+    Basic Xlib, Xft, Xrender, Xrandr, libpng, libxpm libraries
     and [uthash macros](http://troydhanson.github.io/uthash/) are required.
     In Debian or Ubuntu:
 
     ```
-    apt install libx11-dev libxmu-dev libxft-dev libxrender-dev libxrandr-dev 
libpng-dev uthash-dev
+    apt install libx11-dev libxmu-dev libxft-dev libxrender-dev libxrandr-dev 
libpng-dev libxpm-dev uthash-dev
     ```
 
     Maintainer or packager may also install autotools and ronn:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alttab-1.6.0/README.md new/alttab-1.6.1/README.md
--- old/alttab-1.6.0/README.md  2021-03-14 17:10:47.000000000 +0100
+++ new/alttab-1.6.1/README.md  2021-12-06 00:22:57.000000000 +0100
@@ -16,7 +16,8 @@
   alttab  [-w N] [-d N] [-sc N] [-mk <str>] [-kk <str>] [-bk <str>]
   [-pk <str>] [-nk <str>] [-ck <str>] [-mm <N>] [-bm <N>]
   [-t NxM] [-i NxM] [-vp str] [-p str] [-s N] [-theme name] [-bg color]
-  [-fg color] [-frame color] [-font name] [-v|-vv]
+  [-fg color] [-frame color] [-bc color] [-bw <N>] [-font name]
+  [-vertical] [-v|-vv]
 ```
 (see man page for details)
 <!-- ronn page has elements invalid for github markdown, don't link to it -->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alttab-1.6.0/configure new/alttab-1.6.1/configure
--- old/alttab-1.6.0/configure  2021-03-14 17:10:47.000000000 +0100
+++ new/alttab-1.6.1/configure  2021-12-06 00:22:57.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for alttab 1.6.0.
+# Generated by GNU Autoconf 2.69 for alttab 1.6.1.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@
 # Identity of this package.
 PACKAGE_NAME='alttab'
 PACKAGE_TARNAME='alttab'
-PACKAGE_VERSION='1.6.0'
-PACKAGE_STRING='alttab 1.6.0'
+PACKAGE_VERSION='1.6.1'
+PACKAGE_STRING='alttab 1.6.1'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1306,7 +1306,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures alttab 1.6.0 to adapt to many kinds of systems.
+\`configure' configures alttab 1.6.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1373,7 +1373,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of alttab 1.6.0:";;
+     short | recursive ) echo "Configuration of alttab 1.6.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1485,7 +1485,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-alttab configure 1.6.0
+alttab configure 1.6.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1737,7 +1737,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by alttab $as_me 1.6.0, which was
+It was created by alttab $as_me 1.6.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2595,7 +2595,7 @@
 
 # Define the identity of the package.
  PACKAGE='alttab'
- VERSION='1.6.0'
+ VERSION='1.6.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5368,7 +5368,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by alttab $as_me 1.6.0, which was
+This file was extended by alttab $as_me 1.6.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5434,7 +5434,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-alttab config.status 1.6.0
+alttab config.status 1.6.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alttab-1.6.0/configure.ac 
new/alttab-1.6.1/configure.ac
--- old/alttab-1.6.0/configure.ac       2021-03-14 17:10:47.000000000 +0100
+++ new/alttab-1.6.1/configure.ac       2021-12-06 00:22:57.000000000 +0100
@@ -1,4 +1,4 @@
-AC_INIT([alttab], [1.6.0])
+AC_INIT([alttab], [1.6.1])
 AM_INIT_AUTOMAKE([foreign subdir-objects])
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_HEADERS([config.h])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alttab-1.6.0/doc/README new/alttab-1.6.1/doc/README
--- old/alttab-1.6.0/doc/README 2021-03-14 17:10:47.000000000 +0100
+++ new/alttab-1.6.1/doc/README 2021-12-06 00:22:57.000000000 +0100
@@ -4,7 +4,8 @@
   alttab  [-w N] [-d N] [-sc N] [-mk <str>] [-kk <str>] [-bk <str>]
   [-pk <str>] [-nk <str>] [-ck <str>] [-mm <N>] [-bm <N>]
   [-t NxM] [-i NxM] [-vp str] [-p str] [-s N] [-theme name] [-bg color]
-  [-fg color] [-frame color] [-font name] [-v|-vv]
+  [-fg color] [-frame color] [-bc color] [-bw N] [-font name]
+  [-vertical] [-v|-vv]
 
 (see man page for details)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alttab-1.6.0/doc/alttab.1 
new/alttab-1.6.1/doc/alttab.1
--- old/alttab-1.6.0/doc/alttab.1       2021-03-14 17:10:47.000000000 +0100
+++ new/alttab-1.6.1/doc/alttab.1       2021-12-06 00:22:57.000000000 +0100
@@ -1,10 +1,10 @@
 .\" generated with Ronn-NG/v0.9.1
 .\" http://github.com/apjanke/ronn-ng/tree/0.9.1
-.TH "ALTTAB" "1" "March 2021" ""
+.TH "ALTTAB" "1" "December 2021" ""
 .SH "NAME"
 \fBalttab\fR \- the task switcher
 .SH "SYNOPSIS"
-\fBalttab\fR [\fB\-w\fR \fIN\fR] [\fB\-d\fR \fIN\fR] [\fB\-sc\fR \fIN\fR] 
[\fB\-mk\fR \fIstr\fR] [\fB\-kk\fR \fIstr\fR] [\fB\-bk\fR \fIstr\fR] 
[\fB\-pk\fR \fIstr\fR] [\fB\-nk\fR \fIstr\fR] [\fB\-mm\fR \fIN\fR] [\fB\-bm\fR 
\fIN\fR] [\fB\-t\fR \fINxM\fR] [\fB\-i\fR \fINxM\fR] [\fB\-vp\fR \fIstr\fR] 
[\fB\-p\fR \fIstr\fR] [\fB\-s\fR \fIN\fR] [\fB\-theme\fR \fIname\fR] 
[\fB\-bg\fR \fIcolor\fR] [\fB\-fg\fR \fIcolor\fR] [\fB\-frame\fR \fIcolor\fR] 
[\fB\-font\fR \fIname\fR] [\fB\-v\fR|\fB\-vv\fR]
+\fBalttab\fR [\fB\-w\fR \fIN\fR] [\fB\-d\fR \fIN\fR] [\fB\-sc\fR \fIN\fR] 
[\fB\-mk\fR \fIstr\fR] [\fB\-kk\fR \fIstr\fR] [\fB\-bk\fR \fIstr\fR] 
[\fB\-pk\fR \fIstr\fR] [\fB\-nk\fR \fIstr\fR] [\fB\-mm\fR \fIN\fR] [\fB\-bm\fR 
\fIN\fR] [\fB\-t\fR \fINxM\fR] [\fB\-i\fR \fINxM\fR] [\fB\-vp\fR \fIstr\fR] 
[\fB\-p\fR \fIstr\fR] [\fB\-s\fR \fIN\fR] [\fB\-theme\fR \fIname\fR] 
[\fB\-bg\fR \fIcolor\fR] [\fB\-fg\fR \fIcolor\fR] [\fB\-frame\fR \fIcolor\fR] 
[\fB\-bc\fR \fIcolor\fR] [\fB\-bw\fR \fIN\fR] [\fB\-font\fR \fIname\fR] 
[\fB\-vertical\fR] [\fB\-v\fR|\fB\-vv\fR]
 .SH "DESCRIPTION"
 The task switcher designed for minimalistic window managers or standalone X11 
session\.
 .P
@@ -228,6 +228,20 @@
 .IP
 Color of frame around selected tile\.
 .TP
+\fB\-bc\fR \fIcolor\fR
+resource: alttab\.bordercolor
+.br
+default: \fIblack\fR
+.IP
+Color of extra border around the entire switcher\. This border may look 
redundant\. Do not confuse with \fB\-frame\fR\.
+.TP
+\fB\-bw\fR \fIN\fR
+resource: alttab\.borderwidth
+.br
+default: \fI0\fR (no extra border)
+.IP
+Width of extra border above\.
+.TP
 \fB\-font\fR \fIname\fR
 resource: alttab\.font
 .br
@@ -243,6 +257,13 @@
 .br
 wildcard resource like *font in xfd: format\.
 .TP
+\fB\-vertical\fR
+resource: alttab\.vertical
+.br
+default: no
+.IP
+Vertical layout (experimental)\.
+.TP
 \fB\-v\fR, \fB\-vv\fR
 resource: no
 .br
@@ -259,8 +280,6 @@
 .SH "REPORTING BUGS"
 Please report issues on github \fIhttps://github\.com/sagb/alttab/issues\fR\.
 .SH "SEE ALSO"
-skippy\-xd(1)
-.P
 EWMH compatible WM list 
\fIhttps://en\.wikipedia\.org/wiki/Extended_Window_Manager_Hints#List_of_window_managers_that_support_Extended_Window_Manager_Hints\fR\.
 .P
 Description of fontconfig pattern 
\fIhttps://www\.freedesktop\.org/software/fontconfig/fontconfig\-user\.html\fR\.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alttab-1.6.0/doc/alttab.1.ronn 
new/alttab-1.6.1/doc/alttab.1.ronn
--- old/alttab-1.6.0/doc/alttab.1.ronn  2021-03-14 17:10:47.000000000 +0100
+++ new/alttab-1.6.1/doc/alttab.1.ronn  2021-12-06 00:22:57.000000000 +0100
@@ -16,7 +16,7 @@
 
 ## SYNOPSIS
 
-`alttab` [`-w` <N>] [`-d` <N>] [`-sc` <N>] [`-mk` <str>] [`-kk` <str>] [`-bk` 
<str>] [`-pk` <str>] [`-nk` <str>] [`-mm` <N>] [`-bm` <N>] [`-t` <NxM>] [`-i` 
<NxM>] [`-vp` <str>] [`-p` <str>] [`-s` <N>] [`-theme` <name>] [`-bg` <color>] 
[`-fg` <color>] [`-frame` <color>] [`-font` <name>] [`-v`\|`-vv`]
+`alttab` [`-w` <N>] [`-d` <N>] [`-sc` <N>] [`-mk` <str>] [`-kk` <str>] [`-bk` 
<str>] [`-pk` <str>] [`-nk` <str>] [`-mm` <N>] [`-bm` <N>] [`-t` <NxM>] [`-i` 
<NxM>] [`-vp` <str>] [`-p` <str>] [`-s` <N>] [`-theme` <name>] [`-bg` <color>] 
[`-fg` <color>] [`-frame` <color>] [`-bc` <color>] [`-bw` <N>] [`-font` <name>] 
[`-vertical`] [`-v`\|`-vv`]
 
 ## DESCRIPTION
 
@@ -265,6 +265,18 @@
 
     Color of frame around selected tile.
 
+  * `-bc` <color>:
+    resource: alttab.bordercolor  
+    default: <black>
+
+    Color of extra border around the entire switcher. This border may look 
redundant. Do not confuse with `-frame`.
+
+  * `-bw` <N>:
+    resource: alttab.borderwidth  
+    default: <0> (no extra border)
+
+    Width of extra border above.
+
   * `-font` <name>:
     resource: alttab.font  
     default: *xft:sans-10*
@@ -277,6 +289,12 @@
    `-font` option,  
    wildcard resource like \*font in xfd: format.
 
+  * `-vertical`:
+    resource: alttab.vertical  
+    default: no
+
+    Vertical layout (experimental).
+
   * `-v`, `-vv`:
     resource: no  
     default: silent
@@ -300,8 +318,6 @@
 
 ##SEE ALSO
 
-skippy-xd(1)
-
 [EWMH compatible WM 
list](https://en.wikipedia.org/wiki/Extended_Window_Manager_Hints#List_of_window_managers_that_support_Extended_Window_Manager_Hints).
 
 [Description of fontconfig 
pattern](https://www.freedesktop.org/software/fontconfig/fontconfig-user.html).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alttab-1.6.0/doc/alttab.ad 
new/alttab-1.6.1/doc/alttab.ad
--- old/alttab-1.6.0/doc/alttab.ad      2021-03-14 17:10:47.000000000 +0100
+++ new/alttab-1.6.1/doc/alttab.ad      2021-12-06 00:22:57.000000000 +0100
@@ -66,6 +66,15 @@
 ! Random dark frame
 alttab.framecolor:      _rnd_low
 
+! Show X11 window border around the switcher
+!alttab.borderwidth:     4
+
+! Blue border
+!alttab.bordercolor:     #0000FF
+
 ! Bigger font
 !alttab.font:           xft:DejaVu Sans Condensed-18
 
+! Vertical layout
+!alttab.vertical:       anything
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alttab-1.6.0/src/alttab.c 
new/alttab-1.6.1/src/alttab.c
--- old/alttab-1.6.0/src/alttab.c       2021-03-14 17:10:47.000000000 +0100
+++ new/alttab-1.6.1/src/alttab.c       2021-12-06 00:22:57.000000000 +0100
@@ -68,6 +68,8 @@
    -bg color  background color\n\
    -fg color  foreground color\n\
 -frame color  active frame color\n\
+   -bc color  extra border color\n\
+   -bw N      extra border width\n\
  -font name   font name in the form xft:fontconfig_pattern\n\
   -v|-vv      verbose\n\
     -h        help\n\
@@ -90,7 +92,7 @@
     unsigned int wmindex, dsindex, scindex, isrc;
     char *gtile, *gicon, *gview, *gpos;
     int x, y;
-    unsigned int w, h;
+    unsigned int w, h, bw;
     int xpg;
     char *s;
     char *rm;
@@ -121,7 +123,10 @@
         {"-bg", "*background", XrmoptionSepArg, NULL},
         {"-fg", "*foreground", XrmoptionSepArg, NULL},
         {"-frame", "*framecolor", XrmoptionSepArg, NULL},
+        {"-bc", "*bordercolor", XrmoptionSepArg, NULL},
+        {"-bw", "*borderwidth", XrmoptionSepArg, NULL},
         {"-font", "*font", XrmoptionSepArg, NULL},
+        {"-vertical", "*vertical", XrmoptionIsArg, NULL}
     };
     const char *inv = "invalid %s, use -h for help\n";
     const char *rmb = "can't figure out modmask from keycode 0x%x\n";
@@ -345,6 +350,22 @@
     msg(0, "%dx%d tile, %dx%d icon\n",
         g.option_tileW, g.option_tileH, g.option_iconW, g.option_iconH);
 
+    switch (xresource_load_int(&db, XRMAPPNAME, "borderwidth", &bw)) {
+    case 1:
+        if (bw >= BORDER_MIN)
+          g.option_borderW = bw;
+        else
+          die(inv, "bw argument range");
+        break;
+    case 0:
+        g.option_borderW = DEFBORDERW;
+        break;
+    case -1:
+        die(inv, "bw argument");
+        break;
+    }
+    msg(0, "bw: %d\n", g.option_borderW);
+
     bzero(&(g.option_vp), sizeof(g.option_vp));
     g.option_vp_mode = VP_DEFAULT;
     gview = xresource_load_string(&db, XRMAPPNAME, "viewport");
@@ -423,6 +444,8 @@
     g.color[COLFG].name = s ? s : DEFCOLFG;
     s = xresource_load_string(&db, XRMAPPNAME, "framecolor");
     g.color[COLFRAME].name = s ? s : DEFCOLFRAME;
+    s = xresource_load_string(&db, XRMAPPNAME, "bordercolor");
+    g.color[COLBORDER].name = s ? s : DEFCOLBORDER;
 
     s = xresource_load_string(&db, XRMAPPNAME, "font");
     if (s) {
@@ -438,6 +461,10 @@
         g.option_font = DEFFONT + 4;
     }
 
+    s = xresource_load_string(&db, XRMAPPNAME, "vertical");
+    g.option_vertical = (s != NULL);
+    msg(0, "vertical: %d\n", g.option_vertical);
+
 // max recursion for searching windows
 // -1 is "everything"
 // in raw X this returns too much windows, "1" is probably sufficient
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alttab-1.6.0/src/alttab.h 
new/alttab-1.6.1/src/alttab.h
--- old/alttab-1.6.0/src/alttab.h       2021-03-14 17:10:47.000000000 +0100
+++ new/alttab-1.6.1/src/alttab.h       2021-12-06 00:22:57.000000000 +0100
@@ -36,6 +36,7 @@
 #define DEFTILEH    128
 #define DEFICONW    32
 #define DEFICONH    32
+#define DEFBORDERW  0
 #define DEFTHEME    "hicolor"
 #define FRAME_W     8
 //#define DEFFONT   "xft:DejaVu Sans Condensed-10"
@@ -44,10 +45,12 @@
 #define COLBG       0
 #define COLFG       1
 #define COLFRAME    2
-#define NCOLORS     3
+#define COLBORDER   3
+#define NCOLORS     4
 #define DEFCOLBG    "black"
 #define DEFCOLFG    "grey"
 #define DEFCOLFRAME "#a0abab"
+#define DEFCOLBORDER "black"
 
 #define XDEPTH      24          // TODO: get rid of this
 
@@ -150,8 +153,12 @@
 #define SCR_DEFAULT    SCR_ALL
     int option_screen;
     char *option_font;
+#define VERTICAL_DEFAULT false
+    bool option_vertical;
     int option_tileW, option_tileH;
     int option_iconW, option_iconH;
+#define BORDER_MIN      0
+    int option_borderW;
 #define VP_FOCUS        0
 #define VP_POINTER      1
 #define VP_TOTAL        2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/alttab-1.6.0/src/gui.c new/alttab-1.6.1/src/gui.c
--- old/alttab-1.6.0/src/gui.c  2021-03-14 17:10:47.000000000 +0100
+++ new/alttab-1.6.1/src/gui.c  2021-12-06 00:22:57.000000000 +0100
@@ -37,7 +37,7 @@
 // PRIVATE
 
 static unsigned int tileW, tileH, iconW, iconH;
-static unsigned int visualTileW;
+static unsigned int visualTileW, visualTileH;
 static int lastPressedTile;
 static quad scrdim;
 static Window uiwin;
@@ -101,9 +101,16 @@
 //
 static void drawFr(GC gc, int f)
 {
+    int x, y;
+    if (g.option_vertical) {
+        x = 0 + (FRAME_W / 2);
+        y = f * (tileH + FRAME_W) + (FRAME_W / 2);
+    } else {
+        x = f * (tileW + FRAME_W) + (FRAME_W / 2);
+        y = 0 + (FRAME_W / 2);
+    }
     int d = XDrawRectangle(dpy, uiwin, gc,
-                           f * (tileW + FRAME_W) + (FRAME_W / 2),
-                           0 + (FRAME_W / 2),
+                           x, y,
                            tileW + FRAME_W, tileH + FRAME_W);
     if (!d) {
         msg(-1, "can't draw frame\n");
@@ -132,11 +139,19 @@
 //
 static int pointedTile(int x, int y)
 {
-    if (x < (FRAME_W / 2)
-        || x > (uiwinW - (FRAME_W / 2))
-        || y < 0 || y > uiwinH)
-        return -1;
-    return (x - (FRAME_W / 2)) / visualTileW;
+    if (g.option_vertical) {
+        if (y < (FRAME_W / 2)
+            || y > (uiwinH - (FRAME_W / 2))
+            || x < 0 || x > uiwinW)
+            return -1;
+        return (y - (FRAME_W / 2)) / visualTileH;
+    } else {
+        if (x < (FRAME_W / 2)
+            || x > (uiwinW - (FRAME_W / 2))
+            || y < 0 || y > uiwinH)
+            return -1;
+        return (x - (FRAME_W / 2)) / visualTileW;
+    }
 }
 
 //
@@ -216,11 +231,22 @@
  endIcon:
     // draw labels
     if (wi->name && fontLabel) {
+        int x, y, w, h;
+        if (g.option_vertical) {
+            x = iconW + 5;
+            y = FRAME_W; // avoids overlapping with frames
+            w = tileW - iconW - 5;
+            h = tileH - FRAME_W;
+        } else {
+            x = 0;
+            y = iconH + 5;
+            w = tileW;
+            h = tileH - iconH - 5;
+        }
         int dr = drawMultiLine(wi->tile, fontLabel,
                                &(g.color[COLFG].xftcolor),
                                wi->name,
-                               0, (iconH + 5), tileW,
-                               (tileH - iconH - 5));
+                               x, y, w, h);
         if (dr != 1) {
             msg(-1, "can't draw label\n");
         }
@@ -439,20 +465,31 @@
     iconW = g.option_iconW;
     iconH = g.option_iconH;
     float rt = 1.0;
-// for subsequent calculation of width(s), use 'avail_w'
+// for subsequent calculation of width(s), use 'avail_w'/'avail_h'
 // instead of g.vp.w, because they don't match for POS_SPECIFIC
     int avail_w = g.vp.w;
-    if (g.option_positioning == POS_SPECIFIC)
+    int avail_h = g.vp.h;
+    if (g.option_positioning == POS_SPECIFIC) {
         avail_w -= g.option_posX;
+        avail_h -= g.option_posY;
+    }
 // tiles may be smaller if they don't fit viewport
     uiwinW = (tileW + FRAME_W) * g.maxNdx + FRAME_W;
-    if (uiwinW > avail_w) {
+    if (uiwinW > avail_w && !g.option_vertical) {
         int frames = FRAME_W * g.maxNdx + FRAME_W;
         rt = ((float)(avail_w - frames)) / ((float)(tileW * g.maxNdx));
         tileW = (float)tileW *rt;
         tileH = (float)tileH *rt;
         uiwinW = tileW * g.maxNdx + frames;
     }
+    uiwinH = (tileH + FRAME_W) * g.maxNdx + FRAME_W;
+    if (uiwinH > avail_h && g.option_vertical) {
+        int frames = FRAME_W * g.maxNdx + FRAME_W;
+        rt = ((float)(avail_h - frames)) / ((float)(tileH * g.maxNdx));
+        tileW = (float)tileW *rt;
+        tileH = (float)tileH *rt;
+        uiwinH = tileH * g.maxNdx + frames;
+    }
 // icon may be smaller if it doesn't fit tile
     if (iconW > tileW) {
         rt = (float)tileW / (float)iconW;
@@ -464,7 +501,11 @@
         iconH = tileH;
         iconW = rt * iconW;
     }
-    uiwinH = tileH + 2 * FRAME_W;
+    if (g.option_vertical)
+        uiwinW = tileW + 2 * FRAME_W;
+    else
+        uiwinH = tileH + 2 * FRAME_W;
+
     if (g.option_positioning == POS_CENTER) {
         uiwinX = (g.vp.w - uiwinW) / 2 + g.vp.x;
         uiwinY = (g.vp.h - uiwinH) / 2 + g.vp.y;
@@ -472,7 +513,14 @@
         uiwinX = g.option_posX + g.vp.x;
         uiwinY = g.option_posY + g.vp.y;
     }
-    visualTileW = (uiwinW - FRAME_W) / g.maxNdx;
+
+    if (g.option_vertical) {
+        visualTileW = uiwinW - FRAME_W;
+        visualTileH = (uiwinH - FRAME_W) / g.maxNdx;
+    } else {
+        visualTileH = uiwinH - FRAME_W;
+        visualTileW = (uiwinW - FRAME_W) / g.maxNdx;
+    }
     if (g.debug > 0) {
         msg(0, "tile w=%d h=%d\n", tileW, tileH);
         msg(0, "uiwin %dx%d +%d+%d", uiwinW, uiwinH, uiwinX, uiwinY);
@@ -507,9 +555,9 @@
     unsigned long valuemask = CWBackPixel | CWBorderPixel | CWOverrideRedirect;
     XSetWindowAttributes attributes;
     attributes.background_pixel = g.color[COLBG].xcolor.pixel;
-    attributes.border_pixel = g.color[COLFRAME].xcolor.pixel;
+    attributes.border_pixel = g.color[COLBORDER].xcolor.pixel;
     attributes.override_redirect = 1;
-    uiwin = XCreateWindow(dpy, root, uiwinX, uiwinY, uiwinW, uiwinH, 0, // 
border_width
+    uiwin = XCreateWindow(dpy, root, uiwinX, uiwinY, uiwinW, uiwinH, 
g.option_borderW, // border_width
                           CopyFromParent,   // depth
                           InputOutput,  // class
                           CopyFromParent,   // visual
@@ -627,9 +675,17 @@
         if (g.winlist[j].tile) {
             msg(1, "copying tile %d to canvas\n", j);
             //XSync (dpy, false);
+            int dest_x, dest_y;
+            if (g.option_vertical) {
+                dest_x = FRAME_W;
+                dest_y = j * (tileH + FRAME_W) + FRAME_W;
+            } else {
+                dest_x = j * (tileW + FRAME_W) + FRAME_W;
+                dest_y = FRAME_W;
+            }
             int r = XCopyArea(dpy, g.winlist[j].tile, uiwin,
                               g.gcDirect, 0, 0, tileW, tileH,   // src
-                              j * (tileW + FRAME_W) + FRAME_W, FRAME_W);    // 
dst
+                              dest_x, dest_y);    // dst
             //XSync (dpy, false);
             msg(1, "XCopyArea returned %d\n", r);
         }

Reply via email to