Received: from eggs.gnu.org ([2001:4830:134:3::10]:42586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVazk-0002od-7Y for qemu-devel@nongnu.org; Thu, 03 Apr 2014 02:19:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVazc-0003LT-Od for qemu-devel@nongnu.org; Thu, 03 Apr 2014 02:19:24 -0400 Received: from cantor2.suse.de ([195.135.220.15]:46546 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVazc-0003L1-In for qemu-devel@nongnu.org; Thu, 03 Apr 2014 02:19:16 -0400 Date: Thu, 03 Apr 2014 08:19:14 +0200 Message-ID: From: Takashi Iwai In-Reply-To: <533C7087.1030101@redhat.com> References: <1396449543.31715.7.camel@nilsson.home.kraxel.org> <6654339de9ab8191d7a11ce68194b9cd27471d54.1396451183.git.crobinso@redhat.com> <1396451991.31715.25.camel@nilsson.home.kraxel.org> <533C7087.1030101@redhat.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH] gtk: Grab pointer on click when in relative mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cole Robinson Cc: Gerd Hoffmann , qemu-devel@nongnu.org At Wed, 02 Apr 2014 16:18:15 -0400, Cole Robinson wrote: > > On 04/02/2014 11:25 AM, Takashi Iwai wrote: > > At Wed, 02 Apr 2014 17:19:51 +0200, > > Gerd Hoffmann wrote: > >> > >> On Mi, 2014-04-02 at 11:07 -0400, Cole Robinson wrote: > >>> + if (button->button == 1 && > >>> + button->type == GDK_BUTTON_PRESS && > >>> + !gd_is_grab_active(s) && > >>> + !qemu_input_is_absolute()) { > >>> + > >>> gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(s->grab_item), > >>> + TRUE); > >>> + return TRUE; > >>> + } > >> > >> Looks sane on a quick glance (as replacement for patch #4 of Takashi's > >> patch series). Didn't test yet. > > > > Unfortunately, this doesn't work perfectly as expected. > > The input mode change happens after the first click action, thus > > this always results in grabbing if you do left-click at first, even > > after X starts up and vmmouse gets active. > > > > I thought of checking it via notifier, but the notification happens > > also after the first mouse click event. Hmm. > > We could ungrab the pointer if transitioning from relative to absolute mode, > that's effectively what virt-viewer/remote-viewer does (though it also > completely disallows pointer grab in absolute mode... not sure we want to go > that far). Yeah, that's my concern, too. Allowing the input grab in absolute mode still makes some sense although much less than relative mode. Takashi