From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.help Subject: Re: multiple monitor detection Date: Mon, 21 Oct 2024 11:32:28 +0200 Message-ID: <87r089vm1f.fsf@telefonica.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4184"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:/0zJsI7bSdjUnt9RrXn9K5KILgQ= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 21 11:33:23 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t2omx-0000uE-AU for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 21 Oct 2024 11:33:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2omR-0004so-Ac; Mon, 21 Oct 2024 05:32:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2omJ-0004sb-FA for help-gnu-emacs@gnu.org; Mon, 21 Oct 2024 05:32:43 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2omH-00038l-Kz for help-gnu-emacs@gnu.org; Mon, 21 Oct 2024 05:32:43 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1t2omE-000AUY-I0 for help-gnu-emacs@gnu.org; Mon, 21 Oct 2024 11:32:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.17, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148201 Archived-At: Psionic K writes: > I was going to add multiple monitor support to the dslide package. I > have to physical monitors active now. > > However `display-monitor-attributes-list` returns the following: > > (((name . "combined screen") (geometry 0 0 6400 2160) (workarea > 6400 2080 0 80) > (mm-size 1693 572) (frames #) (source . > "fallback"))) > > When running `xrandr`, xrandr is installed, so I'm not sure why the > source is fallback. I restarted Emacs. (30.0.91). > > Xrandr's output more distinctly shows the two physical monitors: > > $ xrandr > Screen 0: minimum 320 x 200, current 6400 x 2160, maximum 16384 x 16384 > eDP connected 2560x1440+3840+0 (normal left inverted right x axis > y axis) 309mm x 174mm > 2560x1440 60.01*+ 48.01 > > HDMI-A-0 connected primary 3840x2160+0+0 (normal left inverted > right x axis y axis) 600mm x 340mm > 3840x2160 60.00*+ 50.00 59.94 30.00 30.00 > 25.00 24.00 29.97 23.98 > > > I'm not sure why the fallback is being used by > `display-monitor-attribute-list'. Xrandr is available to > `executible-find`. > > My goal is to detect the physical monitor and allow the user to > display dslide presentations on the other physical monitor and switch > between them. I'm presently unable to decide how to recognize the two > physical monitors without rolling my own solution on top of xrandr. Which is your O.S.? What is the output of xrandr -v ? Here (display-monitor-attribute-list) shows (((name . "HDMI-2") (geometry 0 0 1920 1080) (workarea 44 0 1876 1080) (mm-size 480 270) (frames #) (source . "XRandR 1.5")) ((name . "HDMI-3") (geometry 1920 0 1680 1050) (workarea 1920 0 1680 1050) (mm-size 474 296) (frames #) (source . "XRandR 1.5")) ((name . "DP-1") (geometry 3600 0 3840 2160) (workarea 3600 0 3840 2160) (mm-size 600 340) (frames) (source . "XRandR 1.5"))) This is GNU/Linux, X window system, KDE, xrandr 1.5.2 Anyways, depending on xrandr is a bit too specific, isn't it? With Wayland becoming more and more used, but maybe the GTK Wayland port does the right thing already on this regard.