From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David De La Harpe Golden Newsgroups: gmane.emacs.devel Subject: Re: is there a hook run when display geometry changes? Date: Fri, 12 Aug 2011 20:40:41 +0100 Message-ID: <4E4581B9.3020002@harpegolden.net> References: <83obzuwlra.fsf@gnu.org> <83liuywkkf.fsf@gnu.org> <4E457816.6080206@harpegolden.net> <871uwqigy1.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1313178054 30804 80.91.229.12 (12 Aug 2011 19:40:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 12 Aug 2011 19:40:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: Thien-Thi Nguyen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 12 21:40:49 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qrxb6-000110-Qs for ged-emacs-devel@m.gmane.org; Fri, 12 Aug 2011 21:40:49 +0200 Original-Received: from localhost ([::1]:36065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qrxb6-0000hW-04 for ged-emacs-devel@m.gmane.org; Fri, 12 Aug 2011 15:40:48 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:42013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qrxb3-0000hF-Q2 for emacs-devel@gnu.org; Fri, 12 Aug 2011 15:40:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qrxb1-00040j-T3 for emacs-devel@gnu.org; Fri, 12 Aug 2011 15:40:45 -0400 Original-Received: from harpegolden.net ([65.99.215.13]:43875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qrxb1-00040f-Q1 for emacs-devel@gnu.org; Fri, 12 Aug 2011 15:40:43 -0400 Original-Received: from [87.198.47.114] (87-198-47-114.ptr.magnet.ie [87.198.47.114]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client CN "David De La Harpe Golden", Issuer "David De La Harpe Golden Personal CA rev 3" (verified OK)) by harpegolden.net (Postfix) with ESMTPSA id CC38D683A8; Fri, 12 Aug 2011 20:40:42 +0100 (IST) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11 In-Reply-To: <871uwqigy1.fsf@ambire.localdomain> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 65.99.215.13 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143178 Archived-At: On 12/08/11 20:10, Thien-Thi Nguyen wrote: > () David De La Harpe Golden > () Fri, 12 Aug 2011 19:59:34 +0100 > > e.g. on X11, you'd want a hook run when emacs [selects for] > and gets an xrandr XRRScreenChangeNotify event, I think. > Could be a separate display-configuration-change-hook or > maybe another trigger of window-configuration-change hook. > > Perhaps there's a way to request such notifications from dbus. That would seem rather unnecessarily convoluted. libxrandr exists and has the function for it. man 3 xrandr A XRRScreenChangeNotifyEvent is sent to a client that has requested notification whenever the screen configuration is changed. A client can perform this request by calling XRRSelectInput, passing the display, the root window, and the RRScreenChangeNotifyMask mask.