Hello community, here is the log from the commit of package azote for openSUSE:Factory checked in at 2020-10-05 19:39:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/azote (Old) and /work/SRC/openSUSE:Factory/.azote.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "azote" Mon Oct 5 19:39:28 2020 rev:7 rq:839495 version:1.8.1 Changes: -------- --- /work/SRC/openSUSE:Factory/azote/azote.changes 2020-10-02 17:37:04.570730492 +0200 +++ /work/SRC/openSUSE:Factory/.azote.new.4249/azote.changes 2020-10-05 19:40:34.437636815 +0200 @@ -1,0 +2,8 @@ +Mon Oct 5 07:19:15 UTC 2020 - Michael Vetter <[email protected]> + +- Update to 1.8.1: + * screen height measurement on sway simplified + * Esc key closes the Azote window + * dialog windows' behaviour unified + +------------------------------------------------------------------- Old: ---- azote-1.8.0.tar.gz New: ---- azote-1.8.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ azote.spec ++++++ --- /var/tmp/diff_new_pack.LlUmmP/_old 2020-10-05 19:40:35.985638328 +0200 +++ /var/tmp/diff_new_pack.LlUmmP/_new 2020-10-05 19:40:35.989638332 +0200 @@ -18,7 +18,7 @@ %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: azote -Version: 1.8.0 +Version: 1.8.1 Release: 0 Summary: Wallpaper manager for Sway, i3 and some other WMs License: GPL-3.0-only ++++++ azote-1.8.0.tar.gz -> azote-1.8.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azote-1.8.0/CHANGELOG.md new/azote-1.8.1/CHANGELOG.md --- old/azote-1.8.0/CHANGELOG.md 2020-09-27 16:31:49.000000000 +0200 +++ new/azote-1.8.1/CHANGELOG.md 2020-10-03 01:10:43.000000000 +0200 @@ -1,8 +1,6 @@ # CHANGELOG -## Development - -**Available for testing as azote-git (AUR)** +## v1.8.0 (2020.09.27) - added fix to avoid crashes on X11, when a display is connected, but turned off [#110](https://github.com/nwg-piotr/azote/issues/110); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azote-1.8.0/README.md new/azote-1.8.1/README.md --- old/azote-1.8.0/README.md 2020-09-27 16:31:49.000000000 +0200 +++ new/azote-1.8.1/README.md 2020-10-03 01:10:43.000000000 +0200 @@ -82,13 +82,16 @@ ### Wayfire In `~/.config/wayfire.ini` set `autostart_wf_shell = false`, and replace `background = wf-background` with -`background = ~/.azotebg`. +`background = ~/.azotebg`. **Important:** optional `wlr-randr` / `wlr-randr-git` and `swaybg` packages are necessary. ### X window managers (i3, Openbox, dwm etc.) You need to execute `~/.fehbg` from your window manager’s startup file. +You'll also need optional `feh` and `xorg-xrandr` packages. + +**Important:** optional `xorg-xrandr` and `feh` packages are necessary. **dwm note:** @@ -150,16 +153,20 @@ - `python-gobject` - `python-pillow` - `gtk3` -- `feh` -- `xorg-xrandr` +- `python-cairo` - `python-send2trash` ### Optional dependencies: -- `grim`, `slurp`: for screen color picker on Sway +- `imagemagick`: for screen color picker in every environment +- `grim`, `slurp`: for screen color picker on sway / wlroots - `maim`, `slop`: for screen color picker on X11 -- `imagemagick`: for screen color picker on both Sway and X11 -- `python-yaml`: (`python3-yaml`) for alacritty.yml toolbox +- `libappindicator-gtk3`: for tray status icon +- `python-yaml`: for alacritty.yml toolbox +- `swaybg`: for setting background on wlroots-based compositors other than sway +- `feh`: for setting background on X11-based WMs +- `xorg-xrandr`: for checking outputs on X11-based WMs +- `wlr-randr` (`wlr-randr-git`): for checking outputs on wlroots-based compositors other than sway Please use assets from the [latest release](https://github.com/nwg-piotr/azote/releases/latest). @@ -239,7 +246,20 @@ See https://specifications.freedesktop.org/desktop-entry-spec/0.9.5/ar01s07.html -### X11 / feh notice +### Floating Azote window does not scale to the screen height + +Since `Gdk.Screen.height` has been deprecated, there's no reasonable way to determine the screen dimensions. +We need to open a temporary window (maximized or fullscreened on sway) and measure its height to open the Azote +window with maximum allowed vertical dimension. + +*This does not apply to sway, where we measure the screen in another way.* + +In `~/.config/azote/azoterc` you'll find the `"screen_measurement_delay": "300"` value. Different hardware +and window managers need different time to open the temporary window. Increase the value if the (floating) +window does not scale to the screen height. Decrease as much as possible to speed up launching Azote (and not to +see the black screen on sway). On my development machine the minimum value is 30 ms on sway and 5 ms on Wayfire. + +## X11 / feh notice The background color picker won't be available. You'll also be unable to select different modes *("scale", "max", "fill", "center", "tile")* for certain displays. The list of modes varies from what you see in Sway diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azote-1.8.0/azote/common.py new/azote-1.8.1/azote/common.py --- old/azote-1.8.0/azote/common.py 2020-09-27 16:31:49.000000000 +0200 +++ new/azote-1.8.1/azote/common.py 2020-10-03 01:10:43.000000000 +0200 @@ -20,6 +20,7 @@ env = {} sway = False +screen_h = None lang = None # dictionary "name": lang_string diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azote-1.8.0/azote/main.py new/azote-1.8.1/azote/main.py --- old/azote-1.8.0/azote/main.py 2020-09-27 16:31:49.000000000 +0200 +++ new/azote-1.8.1/azote/main.py 2020-10-03 01:10:43.000000000 +0200 @@ -708,7 +708,7 @@ w, h = window.get_size() window.destroy() if common.sway or common.env['wm'] == "i3": - h = h * 0.95 + h = int(h * 0.95) print("Available screen height: {} px; measurement delay: {} ms".format(h, common.settings.screen_measurement_delay)) app = GUI(h) @@ -748,6 +748,7 @@ window.set_role("azote") window.connect_after('destroy', destroy) + window.connect("key-release-event", self.handle_keyboard) main_box = Gtk.Box() main_box.set_spacing(5) @@ -928,6 +929,11 @@ common.progress_bar.hide() + def handle_keyboard(self, item, event): + if event.type == Gdk.EventType.KEY_RELEASE and event.keyval == Gdk.KEY_Escape: + Gtk.main_quit() + return True + def on_apply_to_all_button(button): """ @@ -1113,10 +1119,9 @@ self.set_title(filename) self.set_role("toolbox") self.set_resizable(False) - self.set_type_hint(Gtk.WindowType.TOPLEVEL) - # self.set_modal(True) - self.set_transient_for(common.main_window) - self.set_position(Gtk.WindowPosition.NONE) + self.set_type_hint(Gdk.WindowTypeHint.DIALOG) + #self.set_transient_for(common.main_window) + self.set_position(Gtk.WindowPosition.MOUSE) self.set_keep_above(True) self.all_buttons = [] @@ -1299,8 +1304,8 @@ self.set_title(common.lang['screen_color_picker']) self.set_role("toolbox") self.set_resizable(False) - self.set_type_hint(Gtk.WindowType.TOPLEVEL) - self.set_transient_for(common.main_window) + self.set_type_hint(Gdk.WindowTypeHint.DIALOG) + #self.set_transient_for(common.main_window) self.set_position(Gtk.WindowPosition.MOUSE) self.set_keep_above(True) @@ -1448,12 +1453,12 @@ self.properties = common.settings.custom_display self.set_title("Azote custom display") - self.set_role("pop-up") - self.set_type_hint(Gtk.WindowType.TOPLEVEL) - self.set_modal(True) + self.set_role("toolbox") + self.set_resizable(False) + self.set_type_hint(Gdk.WindowTypeHint.DIALOG) self.set_decorated(False) - self.set_transient_for(common.main_window) - self.set_position(Gtk.WindowPosition.CENTER_ON_PARENT) + # self.set_transient_for(common.main_window) + self.set_position(Gtk.WindowPosition.MOUSE) self.set_keep_above(True) self.name_label = Gtk.Label() @@ -1786,20 +1791,26 @@ common.cols = len(common.displays) if len(common.displays) > common.settings.columns else common.settings.columns - # We want Azote to take all the possible screen height. Since Gdk.Screen.height is deprecated, we need to measure - # the current screen height in another way. `w` is a temporary window. - w = TransparentWindow() - if common.sway or common.env['wm'] == "i3": - w.fullscreen() # .maximize() doesn't work as expected on sway - else: - w.maximize() - w.present() - if common.settings.track_files: GLib.timeout_add_seconds(common.settings.tracking_interval_seconds, track_changes) if common.env['app_indicator']: common.indicator = Indicator() - GLib.timeout_add(common.settings.screen_measurement_delay, check_height_and_start, w) + + # We want Azote to take all the possible screen height. Since Gdk.Screen.height is deprecated, we need to measure + # the current screen height in another way. `w` is a temporary window. + # If on sway, we've already detected the screen height in tools/check_displays() and stored it in common.screen_h + if not common.screen_h: + w = TransparentWindow() + if common.sway or common.env['wm'] == "i3": + w.fullscreen() # .maximize() doesn't work as expected on sway + else: + w.maximize() + w.present() + + GLib.timeout_add(common.settings.screen_measurement_delay, check_height_and_start, w) + else: + app = GUI(int(common.screen_h * 0.95)) + Gtk.main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azote-1.8.0/azote/plugins.py new/azote-1.8.1/azote/plugins.py --- old/azote-1.8.0/azote/plugins.py 2020-09-27 16:31:49.000000000 +0200 +++ new/azote-1.8.1/azote/plugins.py 2020-10-03 01:10:43.000000000 +0200 @@ -4,7 +4,7 @@ import gi import common gi.require_version('Gtk', '3.0') -from gi.repository import Gtk +from gi.repository import Gtk, Gdk from tools import create_pixbuf from color_tools import hex_to_rgb @@ -27,10 +27,8 @@ super().__init__() self.set_title('alacritty.yml') - self.set_role("toolbox") self.set_resizable(False) - self.set_type_hint(Gtk.WindowType.TOPLEVEL) - self.set_transient_for(common.main_window) + self.set_type_hint(Gdk.WindowTypeHint.DIALOG) self.set_position(Gtk.WindowPosition.NONE) self.set_keep_above(True) @@ -142,11 +140,9 @@ super().__init__() self.set_title('.Xresources') - self.set_role("toolbox") self.set_resizable(False) - self.set_type_hint(Gtk.WindowType.TOPLEVEL) - self.set_transient_for(common.main_window) - self.set_position(Gtk.WindowPosition.MOUSE) + self.set_type_hint(Gdk.WindowTypeHint.DIALOG) + self.set_position(Gtk.WindowPosition.NONE) self.set_keep_above(True) vbox0 = Gtk.VBox() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azote-1.8.0/azote/tools.py new/azote-1.8.1/azote/tools.py --- old/azote-1.8.0/azote/tools.py 2020-09-27 16:31:49.000000000 +0200 +++ new/azote-1.8.1/azote/tools.py 2020-10-03 01:10:43.000000000 +0200 @@ -89,6 +89,9 @@ 'height': output['rect']['height']} displays.append(display) log("Output found: {}".format(display), common.INFO) + if output['focused']: + common.screen_h = output['rect']['height'] + print("Available screen height: {} px".format(int(common.screen_h * 0.95))) # sort displays list by x, y: from left to right, then from bottom to top displays = sorted(displays, key=lambda x: (x.get('x'), x.get('y'))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azote-1.8.0/setup.py new/azote-1.8.1/setup.py --- old/azote-1.8.0/setup.py 2020-09-27 16:31:49.000000000 +0200 +++ new/azote-1.8.1/setup.py 2020-10-03 01:10:43.000000000 +0200 @@ -8,7 +8,7 @@ setup( name='azote', - version='1.8.0', + version='1.8.1', description='Wallpaper manager for Sway, i3 and some other WMs', packages=['azote'], include_package_data=True,
