Hello community, here is the log from the commit of package herbstluftwm for openSUSE:Factory checked in at 2020-06-09 00:05:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/herbstluftwm (Old) and /work/SRC/openSUSE:Factory/.herbstluftwm.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "herbstluftwm" Tue Jun 9 00:05:31 2020 rev:8 rq:812452 version:0.8.3 Changes: -------- --- /work/SRC/openSUSE:Factory/herbstluftwm/herbstluftwm.changes 2020-05-05 18:56:17.869529946 +0200 +++ /work/SRC/openSUSE:Factory/.herbstluftwm.new.3606/herbstluftwm.changes 2020-06-09 00:07:18.573853762 +0200 @@ -1,0 +2,11 @@ +Mon Jun 8 07:56:04 UTC 2020 - Michael Vetter <mvet...@suse.com> + +- Update to 0.8.3: + * Set .desktop file Type to Application (#903) + * Ignore EnterNotify events by grabs and decoration (#907) + * Don't drop later EnterNotify during enternotify() (#909) + * Consistently use $(BUILDDIR) in Makefile + * Remove unused command interface methods (#917) + * Update and add new tests + +------------------------------------------------------------------- Old: ---- herbstluftwm-0.8.2.tar.gz herbstluftwm-0.8.2.tar.gz.sig New: ---- herbstluftwm-0.8.3.tar.gz herbstluftwm-0.8.3.tar.gz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ herbstluftwm.spec ++++++ --- /var/tmp/diff_new_pack.HACM4c/_old 2020-06-09 00:07:19.837858246 +0200 +++ /var/tmp/diff_new_pack.HACM4c/_new 2020-06-09 00:07:19.841858260 +0200 @@ -17,7 +17,7 @@ Name: herbstluftwm -Version: 0.8.2 +Version: 0.8.3 Release: 0 Summary: A manual tiling window manager License: BSD-2-Clause ++++++ herbstluftwm-0.8.2.tar.gz -> herbstluftwm-0.8.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/HACKING new/herbstluftwm-0.8.3/HACKING --- old/herbstluftwm-0.8.2/HACKING 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/HACKING 2020-06-06 20:45:01.000000000 +0200 @@ -35,8 +35,14 @@ tox -c .. -- -v --maxfail=1 If you run arch linux, it may be necessary to add -e py38 to the tox parameters -(that is, before the --). The argument after the -- are pytest parameters (add --h to see a help). +(that is, before the --). If you have an old version of tox installed, it may be +necessary to pass ../tox.ini instead of .. to the -c parameter. + +The argument after the -- are pytest parameters (add -h to see a help). If you +do not want to use tox and instead run pytest directly, then call the following +command in the build directory: + + python3 -m pytest ../tests [1] http://pytest.org/ [2] https://tox.readthedocs.io/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/INSTALL new/herbstluftwm-0.8.3/INSTALL --- old/herbstluftwm-0.8.2/INSTALL 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/INSTALL 2020-06-06 20:45:01.000000000 +0200 @@ -47,8 +47,8 @@ directory. The compilation and installation is configured by the following CMake variables which you can set on the initial cmake call and alter with ccmake: -CMAKE_INSTALL_PREFIX = /usr/ # the prefix -CMAKE_INSTALL_SYSCONF_ = $(DESTDIR)/etc/ # path to etc directory +CMAKE_INSTALL_PREFIX = /usr/ # the prefix +CMAKE_INSTALL_SYSCONF_PREFIX = $(DESTDIR)/etc/ # path to etc directory Individual paths for special files can be set with the *DIR variables, typically relative to CMAKE_INSTALL_PREFIX. If you are building package, you would @@ -116,3 +116,5 @@ clear mod1 add mod1 = Alt_L --- snap --- + +// vim: nowrap ft=asciidoc tw=80 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/MIGRATION new/herbstluftwm-0.8.3/MIGRATION --- old/herbstluftwm-0.8.2/MIGRATION 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/MIGRATION 2020-06-06 20:45:01.000000000 +0200 @@ -52,4 +52,4 @@ can replace a line like 'set ignore_class "$foo"' in your autostart by 'rule class~"$foo" manage=off' -// vim: tw=80 +// vim: nowrap ft=asciidoc tw=80 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/Makefile new/herbstluftwm-0.8.3/Makefile --- old/herbstluftwm-0.8.2/Makefile 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/Makefile 2020-06-06 20:45:01.000000000 +0200 @@ -17,7 +17,7 @@ cd $@ && cmake .. clean: - rm -r build/ + rm -r $(BUILDDIR)/ doc: $(BUILDDIR) cd $(BUILDDIR)/doc && $(MAKE) @@ -25,6 +25,6 @@ tar: doc git archive --prefix=herbstluftwm-$(VERSION)/ -o $(TARFILE) HEAD tar --transform="flags=r;s,$(BUILDDIR),herbstluftwm-$(VERSION)," --owner=0 --group=0 \ - -uvf $(TARFILE) build/doc/*.html build/doc/*.[1-9] + -uvf $(TARFILE) $(BUILDDIR)/doc/*.html $(BUILDDIR)/doc/*.[1-9] gzip $(TARFILE) gpg --detach-sign $(TARFILE).gz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/NEWS new/herbstluftwm-0.8.3/NEWS --- old/herbstluftwm-0.8.2/NEWS 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/NEWS 2020-06-06 20:45:01.000000000 +0200 @@ -1,6 +1,12 @@ herbstluftwm NEWS -- History of user-visible changes ---------------------------------------------------- +Release 0.8.3 on 2020-06-06 +--------------------------- + + * Bug fixes: + - Fix race condition in focus_follows_mouse handling + Release 0.8.2 on 2020-05-04 --------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/VERSION new/herbstluftwm-0.8.3/VERSION --- old/herbstluftwm-0.8.2/VERSION 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/VERSION 2020-06-06 20:45:01.000000000 +0200 @@ -1 +1 @@ -0.8.2 +0.8.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/doc/herbstclient.1 new/herbstluftwm-0.8.3/doc/herbstclient.1 --- old/herbstluftwm-0.8.2/doc/herbstclient.1 2020-05-04 19:24:13.000000000 +0200 +++ new/herbstluftwm-0.8.3/doc/herbstclient.1 2020-06-06 20:45:10.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: herbstclient .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 2020-05-04 +.\" Date: 2020-06-06 .\" Manual: \ \& -.\" Source: \ \& herbstluftwm 0.8.2 +.\" Source: \ \& herbstluftwm 0.8.3 .\" Language: English .\" -.TH "HERBSTCLIENT" "1" "2020\-05\-04" "\ \& herbstluftwm 0\&.8\&.2" "\ \&" +.TH "HERBSTCLIENT" "1" "2020\-06\-06" "\ \& herbstluftwm 0\&.8\&.3" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/doc/herbstclient.html new/herbstluftwm-0.8.3/doc/herbstclient.html --- old/herbstluftwm-0.8.2/doc/herbstclient.html 2020-05-04 19:24:11.000000000 +0200 +++ new/herbstluftwm-0.8.3/doc/herbstclient.html 2020-06-06 20:45:06.000000000 +0200 @@ -932,7 +932,7 @@ <div id="footer"> <div id="footer-text"> Last updated - 2020-05-04 18:38:27 CEST + 2020-05-03 12:47:35 CEST </div> </div> </body> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/doc/herbstluftwm-tutorial.7 new/herbstluftwm-0.8.3/doc/herbstluftwm-tutorial.7 --- old/herbstluftwm-0.8.2/doc/herbstluftwm-tutorial.7 2020-05-04 19:24:10.000000000 +0200 +++ new/herbstluftwm-0.8.3/doc/herbstluftwm-tutorial.7 2020-06-06 20:45:09.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: herbstluftwm-tutorial .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 2020-05-04 +.\" Date: 2020-06-06 .\" Manual: \ \& -.\" Source: \ \& herbstluftwm 0.8.2 +.\" Source: \ \& herbstluftwm 0.8.3 .\" Language: English .\" -.TH "HERBSTLUFTWM\-TUTORI" "7" "2020\-05\-04" "\ \& herbstluftwm 0\&.8\&.2" "\ \&" +.TH "HERBSTLUFTWM\-TUTORI" "7" "2020\-06\-06" "\ \& herbstluftwm 0\&.8\&.3" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/doc/herbstluftwm-tutorial.html new/herbstluftwm-0.8.3/doc/herbstluftwm-tutorial.html --- old/herbstluftwm-0.8.2/doc/herbstluftwm-tutorial.html 2020-05-04 19:24:13.000000000 +0200 +++ new/herbstluftwm-0.8.3/doc/herbstluftwm-tutorial.html 2020-06-06 20:45:09.000000000 +0200 @@ -1095,7 +1095,7 @@ <div id="footer"> <div id="footer-text"> Last updated - 2020-05-04 18:38:27 CEST + 2020-05-03 12:47:35 CEST </div> </div> </body> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/doc/herbstluftwm.1 new/herbstluftwm-0.8.3/doc/herbstluftwm.1 --- old/herbstluftwm-0.8.2/doc/herbstluftwm.1 2020-05-04 19:24:16.000000000 +0200 +++ new/herbstluftwm-0.8.3/doc/herbstluftwm.1 2020-06-06 20:45:08.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: herbstluftwm .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 2020-05-04 +.\" Date: 2020-06-06 .\" Manual: \ \& -.\" Source: \ \& herbstluftwm 0.8.2 +.\" Source: \ \& herbstluftwm 0.8.3 .\" Language: English .\" -.TH "HERBSTLUFTWM" "1" "2020\-05\-04" "\ \& herbstluftwm 0\&.8\&.2" "\ \&" +.TH "HERBSTLUFTWM" "1" "2020\-06\-06" "\ \& herbstluftwm 0\&.8\&.3" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/doc/herbstluftwm.html new/herbstluftwm-0.8.3/doc/herbstluftwm.html --- old/herbstluftwm-0.8.2/doc/herbstluftwm.html 2020-05-04 19:24:12.000000000 +0200 +++ new/herbstluftwm-0.8.3/doc/herbstluftwm.html 2020-06-06 20:45:06.000000000 +0200 @@ -4255,7 +4255,7 @@ <div id="footer"> <div id="footer-text"> Last updated - 2020-05-04 18:38:27 CEST + 2020-05-12 21:45:10 CEST </div> </div> </body> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/release.sh new/herbstluftwm-0.8.3/release.sh --- old/herbstluftwm-0.8.2/release.sh 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/release.sh 2020-06-06 20:45:01.000000000 +0200 @@ -13,9 +13,6 @@ exit 1 fi -IFS=. read -ra versionargs <<< "$version" - - echo "==> Release commit" echo ":: Patching VERSION" echo "$version" > VERSION @@ -29,7 +26,7 @@ sed -i -e "/$headerexp/,+1s/^[-]*$/$newunderline/" \ -e "s/$headerexp/$newheader/" NEWS -echo ":: Commiting changes" +echo ":: Committing changes" git add NEWS VERSION git commit -m "Release $version" echo ":: Tagging commit" @@ -37,7 +34,7 @@ echo "==> Tarball" echo ":: Tarball creation" -make tar +make BUILDDIR=.build-doc-"$version" tar tarball="herbstluftwm-$version.tar.gz" md5sum=$(md5sum "$tarball" | head -c 13 ) echo ":: Patching www/download.txt" @@ -45,7 +42,7 @@ $version ' ' "$tarball" "$tarball") linerexp="// do not remove this: next version line will be added here" sed -i "s#^$linerexp\$#$line\n$linerexp#" www/download.txt -echo ":: Commiting changes" +echo ":: Committing changes" git add www/download.txt git commit -m "www: Add $version tarball" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/share/herbstluftwm.desktop new/herbstluftwm-0.8.3/share/herbstluftwm.desktop --- old/herbstluftwm-0.8.2/share/herbstluftwm.desktop 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/share/herbstluftwm.desktop 2020-06-06 20:45:01.000000000 +0200 @@ -3,4 +3,4 @@ Name=herbstluftwm Comment=Manual tiling window manager Exec=herbstluftwm -Type=XSession +Type=Application diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/src/command.cpp new/herbstluftwm-0.8.3/src/command.cpp --- old/herbstluftwm-0.8.2/src/command.cpp 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/src/command.cpp 2020-06-06 20:45:01.000000000 +0200 @@ -292,28 +292,6 @@ } } - -// Old C-ish interface to commands: - -int call_command(int argc, char** argv, Output output) { - if (argc < 1) { - return HERBST_COMMAND_NOT_FOUND; - } - - string cmd(argv[0]); - vector<string> args; - for (int i = 1; i < argc; i++) { - args.push_back(argv[i]); - } - - return Commands::call(Input(cmd, args), output); -} - -int call_command_no_output(int argc, char** argv) { - std::ostringstream output; - return call_command(argc, argv, output); -} - int list_commands(Output output) { for (auto cmd : *Commands::get()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/src/command.h new/herbstluftwm-0.8.3/src/command.h --- old/herbstluftwm-0.8.2/src/command.h 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/src/command.h 2020-06-06 20:45:01.000000000 +0200 @@ -141,15 +141,6 @@ std::shared_ptr<const CommandTable> get(); } -// Mark the following two functions as obsolete to make it easier to detect and -// fix call-sites gradually. - -int call_command(int argc, char** argv, Output output) - /* __attribute__((deprecated("Old C interface, use CommandTable"))) */; - -int call_command_no_output(int argc, char** argv) - /* __attribute__((deprecated("Old C interface, use CommandTable"))) */; - // commands int list_commands(Output output); int complete_command(int argc, char** argv, Output output); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/src/main.cpp new/herbstluftwm-0.8.3/src/main.cpp --- old/herbstluftwm-0.8.2/src/main.cpp 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/src/main.cpp 2020-06-06 20:45:01.000000000 +0200 @@ -368,12 +368,7 @@ focus_client(client, true, true, true); return 0; } else { - output << argv[0] << ": Could not find client"; - if (argc > 1) { - output << " \"" << argv[1] << "\".\n"; - } else { - output << ".\n"; - } + output << argv[0] << ": Could not find client \"" << argv[1] << "\".\n"; return HERBST_INVALID_ARGUMENT; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/src/monitor.cpp new/herbstluftwm-0.8.3/src/monitor.cpp --- old/herbstluftwm-0.8.2/src/monitor.cpp 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/src/monitor.cpp 2020-06-06 20:45:01.000000000 +0200 @@ -49,7 +49,7 @@ , mouse { 0, 0 } , rect(rect_) , settings(settings_) - //, monman(monman_) + , monman(monman_) { for (auto i : {&pad_up, &pad_left, &pad_right, &pad_down}) { i->setWriteable(); @@ -261,7 +261,7 @@ // remove all enternotify-events from the event queue that were // generated while arranging the clients on this monitor - drop_enternotify_events(); + monman->dropEnterNotifyEvents.emit(); } Monitor* find_monitor_by_name(const char* name) { @@ -472,8 +472,6 @@ monitor->restack(); other->applyLayout(); monitor->applyLayout(); - // discard enternotify-events - drop_enternotify_events(); monitor_update_focus_objects(); Ewmh::get().updateCurrentDesktop(); emit_tag_changed(other->tag, other->index()); @@ -504,7 +502,7 @@ old_tag->setVisible(false); // focus window just has been shown // discard enternotify-events - drop_enternotify_events(); + g_monitors->dropEnterNotifyEvents.emit(); monitor_update_focus_objects(); Ewmh::get().updateCurrentDesktop(); emit_tag_changed(tag, g_monitors->cur_monitor); @@ -655,7 +653,7 @@ // discard all mouse events caused by this pointer movage from the // event queue, so the focus really stays in the last focused window on // this monitor and doesn't jump to the window hovered by the mouse - drop_enternotify_events(); + g_monitors->dropEnterNotifyEvents.emit(); } // update objects monitor_update_focus_objects(); @@ -723,14 +721,6 @@ } } -void drop_enternotify_events() { - XEvent ev; - XSync(g_display, False); - while (XCheckMaskEvent(g_display, EnterWindowMask, &ev)) { - ; - } -} - Rectangle Monitor::getFloatingArea() { auto m = this; auto r = m->rect; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/src/monitor.h new/herbstluftwm-0.8.3/src/monitor.h --- old/herbstluftwm-0.8.2/src/monitor.h 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/src/monitor.h 2020-06-06 20:45:01.000000000 +0200 @@ -59,7 +59,7 @@ std::string getTagString(); std::string setTagString(std::string new_tag); Settings* settings; - //MonitorManager* monman; + MonitorManager* monman; }; // adds a new monitor to the monitors list and returns a pointer to it @@ -82,8 +82,6 @@ void ensure_monitors_are_available(); void all_monitors_replace_previous_tag(HSTag* old, HSTag* newmon); -void drop_enternotify_events(); - void monitor_update_focus_objects(); int shift_to_monitor(int argc, char** argv, Output output); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/src/monitormanager.cpp new/herbstluftwm-0.8.3/src/monitormanager.cpp --- old/herbstluftwm-0.8.2/src/monitormanager.cpp 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/src/monitormanager.cpp 2020-06-06 20:45:01.000000000 +0200 @@ -386,7 +386,7 @@ monitor->applyLayout(); tag->setVisible(true); emit_tag_changed(tag, g_monitors->size() - 1); - drop_enternotify_events(); + dropEnterNotifyEvents.emit(); return HERBST_EXIT_SUCCESS; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/src/monitormanager.h new/herbstluftwm-0.8.3/src/monitormanager.h --- old/herbstluftwm-0.8.2/src/monitormanager.h 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/src/monitormanager.h 2020-06-06 20:45:01.000000000 +0200 @@ -9,6 +9,7 @@ #include "link.h" #include "monitor.h" #include "plainstack.h" +#include "signal.h" extern MonitorManager* g_monitors; @@ -83,6 +84,13 @@ int cur_monitor; + /** + * @brief this signal is emitted whenever the mouse cursor have + * entered another window although the user has not moved the cursor + * manually. In this case the respective events have to be ignored. + */ + Signal dropEnterNotifyEvents; + private: std::function<int(Input, Output)> byFirstArg(MonitorCommand cmd); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/src/xmainloop.cpp new/herbstluftwm-0.8.3/src/xmainloop.cpp --- old/herbstluftwm-0.8.2/src/xmainloop.cpp 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/src/xmainloop.cpp 2020-06-06 20:45:01.000000000 +0200 @@ -68,6 +68,9 @@ handlerTable_[ MotionNotify ] = EH(&XMainLoop::motionnotify); handlerTable_[ PropertyNotify ] = EH(&XMainLoop::propertynotify); handlerTable_[ UnmapNotify ] = EH(&XMainLoop::unmapnotify); + + root_->monitors->dropEnterNotifyEvents + .connect(this, &XMainLoop::dropEnterNotifyEvents); } //! scan for windows and add them to the list of managed clients @@ -175,6 +178,21 @@ aboutToQuit_ = true; } +void XMainLoop::dropEnterNotifyEvents() +{ + if (duringEnterNotify_) { + // during a enternotify(), no artificial enter notify events + // can be created. Moreover, on quick mouse movements, an enter notify + // might be followed by further enter notify events, which + // must not be dropped. + return; + } + XEvent ev; + XSync(X_.display(), False); + while (XCheckMaskEvent(X_.display(), EnterWindowMask, &ev)) { + } +} + /* ----------------------------- */ /* event handler implementations */ /* ----------------------------- */ @@ -338,7 +356,16 @@ } void XMainLoop::enternotify(XCrossingEvent* ce) { - HSDebug("name is: EnterNotify, focus = %d\n", ce->focus); + HSDebug("EnterNotify, focus = %d, window = 0x%lx\n", ce->focus, ce->window); + if (ce->mode != NotifyNormal || ce->detail == NotifyInferior) { + // ignore an event if it is caused by (un-)grabbing the mouse or + // if the pointer moves from a window to its decoration. + // for 'ce->detail' see: + // https://tronche.com/gui/x/xlib/events/window-entry-exit/normal.html + return; + } + // Warning: we have to set this to false again! + duringEnterNotify_ = true; if (!root_->mouse->mouse_is_dragging() && root_->settings()->focus_follows_mouse() && ce->focus == false) { @@ -368,6 +395,7 @@ } } } + duringEnterNotify_ = false; } void XMainLoop::expose(XEvent* event) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/src/xmainloop.h new/herbstluftwm-0.8.3/src/xmainloop.h --- old/herbstluftwm-0.8.2/src/xmainloop.h 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/src/xmainloop.h 2020-06-06 20:45:01.000000000 +0200 @@ -3,6 +3,8 @@ #include <X11/X.h> #include <X11/Xlib.h> +#include "x11-types.h" + class Root; class XConnection; @@ -14,6 +16,8 @@ //! quit the main loop as soon as possible void quit(); using EventHandler = void (XMainLoop::*)(XEvent*); + + void dropEnterNotifyEvents(); private: // members XConnection& X_; @@ -38,4 +42,6 @@ void maprequest(XMapRequestEvent* mapreq); void propertynotify(XPropertyEvent* event); void unmapnotify(XUnmapEvent* event); + + bool duringEnterNotify_ = false; //! whether we are in enternotify() }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/tests/conftest.py new/herbstluftwm-0.8.3/tests/conftest.py --- old/herbstluftwm-0.8.2/tests/conftest.py 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/tests/conftest.py 2020-06-06 20:45:01.000000000 +0200 @@ -385,6 +385,15 @@ if not expect_sth or match_found(): break + # decode remaining bytes for the final match_found() check + if stderr_bytes != b'': + stderr += stderr_bytes.decode() + sys.stderr.write(stderr_bytes.decode()) + sys.stderr.flush() + if stdout_bytes != b'': + stdout += stdout_bytes.decode() + sys.stdout.write(stdout_bytes.decode()) + sys.stdout.flush() duration = (datetime.now() - started).total_seconds() if expect_sth and not match_found(): assert False, f'Expected string not encountered within {duration:.1f} seconds' @@ -394,6 +403,9 @@ """ Context manager for wrapping commands that are expected to result in certain output on hlwm's stdout (e.g., input events). + + Warning: do not run call(...) within such a context, but only + unchecked_call(..., read_hlwm_output=False) instead """ self.read_and_echo_output() yield @@ -404,6 +416,9 @@ """ Context manager for wrapping commands that are expected to result in certain output on hlwm's stderr (e.g., input events). + + Warning: do not run call(...) within such a context, but only + unchecked_call(..., read_hlwm_output=False) instead """ self.read_and_echo_output() yield diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/tests/test_basic_events.py new/herbstluftwm-0.8.3/tests/test_basic_events.py --- old/herbstluftwm-0.8.2/tests/test_basic_events.py 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/tests/test_basic_events.py 2020-06-06 20:45:01.000000000 +0200 @@ -107,3 +107,42 @@ mouse.click('1') expected_focus = 1 if focus_follows_mouse or click else 0 assert hlwm.get_attr('clients.focus.winid') == winids[expected_focus] + + +def test_drop_enter_notify_events(hlwm, mouse): + """test that tiling/resizing the clients does not trigger + mouse enter notifications + """ + hlwm.call('set focus_follows_mouse on') + # place two clients in frames side by side + winid = hlwm.create_clients(2) + layout = '(split horizontal:0.5:0 (clients max:0 {}) (clients max:0 {}))' + layout = layout.format(winid[0], winid[1]) + hlwm.call(['load', layout]) + + # place the mouse on the right window, but place it + # close to the edge, round by the corner + mouse.move_into(winid[1], 10, 10) + assert hlwm.get_attr('clients.focus.winid') == winid[1] + + # Sudden 'resize' call shouldn't take away the focus + hlwm.call('resize right 0.4') + assert hlwm.get_attr('clients.focus.winid') == winid[1] + + +@pytest.mark.parametrize("client_count", [7, 8, 9, 10]) +def test_enternotify_do_not_drop_events(hlwm, mouse, client_count): + """test that when triggering multiple enter notify events + that the last enter notify event survives + """ + hlwm.call('set focus_follows_mouse on') + winid = hlwm.create_clients(client_count) + + # place many enter notify events in the event queue + for i in range(0, client_count): + # here, it's important that move_into does not sync with hlwm + # such that the event queue in hlwm builds up + mouse.move_into(winid[i], 10, 10) + + # finally, all enter notify events must survive + assert hlwm.get_attr('clients.focus.winid') == winid[client_count - 1] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/tests/test_herbstluftwm.py new/herbstluftwm-0.8.3/tests/test_herbstluftwm.py --- old/herbstluftwm-0.8.2/tests/test_herbstluftwm.py 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/tests/test_herbstluftwm.py 2020-06-06 20:45:01.000000000 +0200 @@ -12,7 +12,12 @@ def test_reload(hlwm_process, hlwm): with hlwm_process.wait_stdout_match('hlwm started'): - hlwm.call('reload') + # run the command, but read not hlwm's output in unchecked_call() + # but instead, let the current context manager read it! + proc = hlwm.unchecked_call('reload', read_hlwm_output=False) + assert not proc.stderr + assert not proc.stdout + assert proc.returncode == 0 def test_herbstluftwm_already_running(hlwm): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/tests/test_monitor.py new/herbstluftwm-0.8.3/tests/test_monitor.py --- old/herbstluftwm-0.8.2/tests/test_monitor.py 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/tests/test_monitor.py 2020-06-06 20:45:01.000000000 +0200 @@ -297,3 +297,25 @@ for command in cmds: hlwm.call_xfail([command, 'thismonitordoesnotexist']) \ .expect_stderr('Monitor "thismonitordoesnotexist" not found') + + +def test_list_padding(hlwm): + hlwm.call('add othertag') + hlwm.call('add_monitor 800x600+600+0') + pad0 = '5 20 3 30' + pad1 = '1 2 4 8' + hlwm.call('pad 0 ' + pad0) + hlwm.call('pad 1 ' + pad1) + + # this is a very primitive command, so we directly test multiple things at once + assert hlwm.call('list_padding 0').stdout == pad0 + '\n' + assert hlwm.call('list_padding 1').stdout == pad1 + '\n' + + assert hlwm.call('list_padding').stdout == pad0 + '\n' + hlwm.call('focus_monitor 1') + assert hlwm.call('list_padding').stdout == pad1 + '\n' + + +def test_list_padding_invalid_monitor(hlwm): + hlwm.call_xfail('list_padding 23') \ + .expect_stderr('Monitor.*not found') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/tests/test_mousebind.py new/herbstluftwm-0.8.3/tests/test_mousebind.py --- old/herbstluftwm-0.8.2/tests/test_mousebind.py 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/tests/test_mousebind.py 2020-06-06 20:45:01.000000000 +0200 @@ -206,6 +206,29 @@ assert (geom_after.width, geom_after.height) == final_size +def test_drag_zoom_floating_client(hlwm, x11, mouse): + client, winid = x11.create_client(geometry=(50, 50, 300, 200)) + hlwm.call(f'set_attr clients.{winid}.floating true') + geom_before = client.get_geometry() + assert (geom_before.width, geom_before.height) == (300, 200) + x_before, y_before = x11.get_absolute_top_left(client) + center_before = (x_before + geom_before.width / 2, y_before + geom_before.height / 2) + mouse.move_into(winid, x=0, y=0) + + hlwm.call(['drag', winid, 'zoom']) + assert hlwm.get_attr('clients.dragged.winid') == winid + mouse.move_relative(100, -30) + final_size = (geom_before.width - (100 * 2), geom_before.height + (30 * 2)) + + # stop drag and check final size and client center + mouse.click('1', wait=True) + geom_after = client.get_geometry() + assert (geom_after.width, geom_after.height) == final_size + x_after, y_after = x11.get_absolute_top_left(client) + center_after = (x_after + geom_after.width / 2, y_after + geom_after.height / 2) + assert center_before == center_after + + # we had a race condition here, so increase the likelyhood # that we really fixed it: @pytest.mark.parametrize('repeat', list(range(0, 100))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/tests/test_root_commands.py new/herbstluftwm-0.8.3/tests/test_root_commands.py --- old/herbstluftwm-0.8.2/tests/test_root_commands.py 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/tests/test_root_commands.py 2020-06-06 20:45:01.000000000 +0200 @@ -467,3 +467,26 @@ for v in values: hlwm.call_xfail(['set_attr', attribute, v]) \ .expect_stderr('out of range') + + +def test_tag_status_invalid_monitor(hlwm): + hlwm.call_xfail('tag_status foobar') \ + .expect_stderr('Monitor "foobar" not found!') + + +def test_tag_status(hlwm, x11): + hlwm.call('add foobar') + hlwm.call('add baz') + hlwm.call('add qux') + hlwm.create_client() + hlwm.call('move baz') + winid, _ = hlwm.create_client() + hlwm.call('move qux') + x11.make_window_urgent(x11.window(winid)) + + assert hlwm.call('tag_status').stdout == "\t#default\t.foobar\t:baz\t!qux\t" + + +def test_jumpto_invalid_client(hlwm): + hlwm.call_xfail('jumpto foobar') \ + .expect_stderr('Could not find client "foobar".') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/tests/test_spawn.py new/herbstluftwm-0.8.3/tests/test_spawn.py --- old/herbstluftwm-0.8.2/tests/test_spawn.py 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/tests/test_spawn.py 2020-06-06 20:45:01.000000000 +0200 @@ -1,4 +1,7 @@ def test_spawn(hlwm, hlwm_process): - hlwm.call(['spawn', 'sh', '-c', 'echo >&2 spawnyboi']) - - hlwm_process.wait_stderr_match('spawnyboi') + with hlwm_process.wait_stderr_match('spawnyboi'): + cmd = ['spawn', 'sh', '-c', 'echo >&2 spawnyboi'] + proc = hlwm.unchecked_call(cmd, read_hlwm_output=False) + assert proc.returncode == 0 + assert not proc.stderr + assert not proc.stdout diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/herbstluftwm-0.8.2/www/download.txt new/herbstluftwm-0.8.3/www/download.txt --- old/herbstluftwm-0.8.2/www/download.txt 2020-05-04 19:24:08.000000000 +0200 +++ new/herbstluftwm-0.8.3/www/download.txt 2020-06-06 20:45:01.000000000 +0200 @@ -47,6 +47,7 @@ | 0.7.2 | 2019-05-28 | eccbb5d0b1836... | link:tarballs/herbstluftwm-0.7.2.tar.gz[tar.gz] |link:tarballs/herbstluftwm-0.7.2.tar.gz.sig[sig] | 0.8.0 | 2020-04-09 | 73323c507b05a... | link:tarballs/herbstluftwm-0.8.0.tar.gz[tar.gz] |link:tarballs/herbstluftwm-0.8.0.tar.gz.sig[sig] | 0.8.1 | 2020-04-21 | 00e08ecc1225e... | link:tarballs/herbstluftwm-0.8.1.tar.gz[tar.gz] |link:tarballs/herbstluftwm-0.8.1.tar.gz.sig[sig] +| 0.8.2 | 2020-05-04 | 52a9faf22c131... | link:tarballs/herbstluftwm-0.8.2.tar.gz[tar.gz] |link:tarballs/herbstluftwm-0.8.2.tar.gz.sig[sig] // do not remove this: next version line will be added here |====================================================================================================================