* bug#986: x-display-pixel-width does NOT return current display width correctly [not found] ` <7swshc2ke3.fsf@one.dot.net> @ 2008-09-16 17:03 ` Baoqiu Cui 2008-09-18 18:30 ` bug#986: marked as done (x-display-pixel-width does NOT return current display width correctly) Emacs bug Tracking System 0 siblings, 1 reply; 4+ messages in thread From: Baoqiu Cui @ 2008-09-16 17:03 UTC (permalink / raw) To: gnu-emacs-bug Chris McMahan <first_initiallastname@one.dot.net> writes: > Baoqiu Cui <cbaoqiu@yahoo.com> writes: > >> Hi, >> >> I wrote some functions a long time ago to automatically adjust the frame >> size based on display resolution, and they worked well in XEmacs but not >> in Emacs. The reason is that function x-display-pixel-width behaves a >> little differently in Emacs. >> >> In XEmacs, (x-display-pixel-width) can recognize the display resolution >> changes after XEmacs is started. For example, if the display resolution >> was originally set to 1400x1050 when XEmacs was started, >> (x-display-pixel-width) would 1400; then, if the display resolution is >> changed to 1280x1024 while XEmacs is still running, >> (x-display-pixel-width) would return 1280. >> >> However, (x-display-pixel-width) on Emacs is NOT able to recognize such >> physical display resolution change (from 1400x1050 to 1280x1024) and >> will still return 1400. >> >> Does anyone know if there is any function in Emacs that works as XEmacs' >> x-display-pixel-width? >> >> Thanks, >> Baoqiu > > I don't know of any function to do this after the resolution changes. I > would almost consider it a bug that x-display-pixel-width does not > reflect the new resolution. Thanks for your reply, Chris. Yes, this seems to be a bug in Emacs (unless the author claims that it is a feature :-). For now, I am using the following piece of code as a workaround (it works pretty well on Linux boxes, but is terribly slow on Cygwin): (with-temp-buffer (call-process "xdpyinfo" nil t) (goto-char (point-min)) (if (re-search-forward "^ dimensions: +\\([0-9]+\\)x" nil t) (string-to-number (match-string 1)) ;; Use 1024 as the default resolution 1024)) > I'd be interested in seeing your frame functions. I have similar > functions that I've built to move the frame from my left monitor to my > right monitor, resize to fit each monitor, and shrink and enlarge each > frame. I did not do many fancy stuffs. All I did was to have different frame configurations for different display resolutions (1024x768, 1280x1024, ..., 1920x1200), and have some key binding(s) to resize the frame in the way I want. The key binding that I use the most is the one that toggles between the normal (default) frame configuration and the "maximized" configuration. Thanks, Baoqiu > > - Chris > > -- > (. .) > =ooO=(_)=Ooo===================================== > Chris McMahan | first_initiallastname@one.dot.net > ================================================= ^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#986: marked as done (x-display-pixel-width does NOT return current display width correctly) 2008-09-16 17:03 ` bug#986: x-display-pixel-width does NOT return current display width correctly Baoqiu Cui @ 2008-09-18 18:30 ` Emacs bug Tracking System 0 siblings, 0 replies; 4+ messages in thread From: Emacs bug Tracking System @ 2008-09-18 18:30 UTC (permalink / raw) To: Chong Yidong [-- Attachment #1: Type: text/plain, Size: 897 bytes --] Your message dated Thu, 18 Sep 2008 14:27:07 -0400 with message-id <87hc8d1f9g.fsf@cyd.mit.edu> and subject line Re: x-display-pixel-width does NOT return current display width correctly has caused the Emacs bug report #986, regarding x-display-pixel-width does NOT return current display width correctly to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) -- 986: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=986 Emacs Bug Tracking System Contact don@donarmstrong.com with problems [-- Attachment #2: Type: message/rfc822, Size: 6991 bytes --] From: Baoqiu Cui <cbaoqiu@yahoo.com> To: gnu-emacs-bug@moderators.isc.org Subject: Re: x-display-pixel-width does NOT return current display width correctly Date: Tue, 16 Sep 2008 10:03:23 -0700 Message-ID: <yoru8wtsdnvo.fsf@AFTERRDOUBT-LX.ds.corp.yahoo.com> Chris McMahan <first_initiallastname@one.dot.net> writes: > Baoqiu Cui <cbaoqiu@yahoo.com> writes: > >> Hi, >> >> I wrote some functions a long time ago to automatically adjust the frame >> size based on display resolution, and they worked well in XEmacs but not >> in Emacs. The reason is that function x-display-pixel-width behaves a >> little differently in Emacs. >> >> In XEmacs, (x-display-pixel-width) can recognize the display resolution >> changes after XEmacs is started. For example, if the display resolution >> was originally set to 1400x1050 when XEmacs was started, >> (x-display-pixel-width) would 1400; then, if the display resolution is >> changed to 1280x1024 while XEmacs is still running, >> (x-display-pixel-width) would return 1280. >> >> However, (x-display-pixel-width) on Emacs is NOT able to recognize such >> physical display resolution change (from 1400x1050 to 1280x1024) and >> will still return 1400. >> >> Does anyone know if there is any function in Emacs that works as XEmacs' >> x-display-pixel-width? >> >> Thanks, >> Baoqiu > > I don't know of any function to do this after the resolution changes. I > would almost consider it a bug that x-display-pixel-width does not > reflect the new resolution. Thanks for your reply, Chris. Yes, this seems to be a bug in Emacs (unless the author claims that it is a feature :-). For now, I am using the following piece of code as a workaround (it works pretty well on Linux boxes, but is terribly slow on Cygwin): (with-temp-buffer (call-process "xdpyinfo" nil t) (goto-char (point-min)) (if (re-search-forward "^ dimensions: +\\([0-9]+\\)x" nil t) (string-to-number (match-string 1)) ;; Use 1024 as the default resolution 1024)) > I'd be interested in seeing your frame functions. I have similar > functions that I've built to move the frame from my left monitor to my > right monitor, resize to fit each monitor, and shrink and enlarge each > frame. I did not do many fancy stuffs. All I did was to have different frame configurations for different display resolutions (1024x768, 1280x1024, ..., 1920x1200), and have some key binding(s) to resize the frame in the way I want. The key binding that I use the most is the one that toggles between the normal (default) frame configuration and the "maximized" configuration. Thanks, Baoqiu > > - Chris > > -- > (. .) > =ooO=(_)=Ooo===================================== > Chris McMahan | first_initiallastname@one.dot.net > ================================================= [-- Attachment #3: Type: message/rfc822, Size: 1022 bytes --] From: Chong Yidong <cyd@stupidchicken.com> To: Baoqiu Cui <cbaoqiu@yahoo.com> Cc: 986-done@emacsbugs.donarmstrong.com Subject: Re: x-display-pixel-width does NOT return current display width correctly Date: Thu, 18 Sep 2008 14:27:07 -0400 Message-ID: <87hc8d1f9g.fsf@cyd.mit.edu> I've just checked in a fix. Thanks for the report. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <87hc8d1f9g.fsf@cyd.mit.edu>]
* bug#987: x-display-pixel-width not returning correct value after resolution change @ 2008-09-16 17:43 ` Baoqiu Cui 2008-09-18 18:30 ` bug#987: marked as done (x-display-pixel-width not returning correct value after resolution change) Emacs bug Tracking System 0 siblings, 1 reply; 4+ messages in thread From: Baoqiu Cui @ 2008-09-16 17:43 UTC (permalink / raw) To: gnu-emacs-bug It seems that function x-display-pixel-width behaves a little differently in GNU Emacs and XEmacs. In XEmacs, (x-display-pixel-width) can recognize the display resolution changes after XEmacs is started. For example, if the display resolution was originally set to 1400x1050 when XEmacs was started, (x-display-pixel-width) would return 1400; then, if the display resolution is changed to 1280x1024 while XEmacs is still running, (x-display-pixel-width) would return 1280. However, (x-display-pixel-width) on GNU Emacs is NOT able to recognize such physical display resolution change (from 1400x1050 to 1280x1024) and will still return 1400. I am not sure if this is a bug or feature on GNU Emacs, but I would like to see this function work like its counterpart in XEmacs. Regards, Baoqiu ^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#987: marked as done (x-display-pixel-width not returning correct value after resolution change) 2008-09-16 17:43 ` bug#987: x-display-pixel-width not returning correct value after resolution change Baoqiu Cui @ 2008-09-18 18:30 ` Emacs bug Tracking System 0 siblings, 0 replies; 4+ messages in thread From: Emacs bug Tracking System @ 2008-09-18 18:30 UTC (permalink / raw) To: Chong Yidong [-- Attachment #1: Type: text/plain, Size: 901 bytes --] Your message dated Thu, 18 Sep 2008 14:27:07 -0400 with message-id <87hc8d1f9g.fsf@cyd.mit.edu> and subject line Re: x-display-pixel-width does NOT return current display width correctly has caused the Emacs bug report #986, regarding x-display-pixel-width not returning correct value after resolution change to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) -- 986: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=986 Emacs Bug Tracking System Contact don@donarmstrong.com with problems [-- Attachment #2: Type: message/rfc822, Size: 5118 bytes --] From: Baoqiu Cui <cbaoqiu@yahoo.com> To: gnu-emacs-bug@moderators.isc.org Subject: x-display-pixel-width not returning correct value after resolution change Date: Tue, 16 Sep 2008 10:43:44 -0700 Message-ID: <yoruwshcc7fz.fsf@AFTERRDOUBT-LX.ds.corp.yahoo.com> It seems that function x-display-pixel-width behaves a little differently in GNU Emacs and XEmacs. In XEmacs, (x-display-pixel-width) can recognize the display resolution changes after XEmacs is started. For example, if the display resolution was originally set to 1400x1050 when XEmacs was started, (x-display-pixel-width) would return 1400; then, if the display resolution is changed to 1280x1024 while XEmacs is still running, (x-display-pixel-width) would return 1280. However, (x-display-pixel-width) on GNU Emacs is NOT able to recognize such physical display resolution change (from 1400x1050 to 1280x1024) and will still return 1400. I am not sure if this is a bug or feature on GNU Emacs, but I would like to see this function work like its counterpart in XEmacs. Regards, Baoqiu [-- Attachment #3: Type: message/rfc822, Size: 1022 bytes --] From: Chong Yidong <cyd@stupidchicken.com> To: Baoqiu Cui <cbaoqiu@yahoo.com> Cc: 986-done@emacsbugs.donarmstrong.com Subject: Re: x-display-pixel-width does NOT return current display width correctly Date: Thu, 18 Sep 2008 14:27:07 -0400 Message-ID: <87hc8d1f9g.fsf@cyd.mit.edu> I've just checked in a fix. Thanks for the report. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-09-18 18:30 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <yorufxo0elcg.fsf@AFTERRDOUBT-LX.ds.corp.yahoo.com> [not found] ` <7swshc2ke3.fsf@one.dot.net> 2008-09-16 17:03 ` bug#986: x-display-pixel-width does NOT return current display width correctly Baoqiu Cui 2008-09-18 18:30 ` bug#986: marked as done (x-display-pixel-width does NOT return current display width correctly) Emacs bug Tracking System [not found] <87hc8d1f9g.fsf@cyd.mit.edu> 2008-09-16 17:43 ` bug#987: x-display-pixel-width not returning correct value after resolution change Baoqiu Cui 2008-09-18 18:30 ` bug#987: marked as done (x-display-pixel-width not returning correct value after resolution change) Emacs bug Tracking System
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).