bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#986: marked as done (x-display-pixel-width does NOT return current


From: Emacs bug Tracking System
Subject: bug#986: marked as done (x-display-pixel-width does NOT return current display width correctly)
Date: Thu, 18 Sep 2008 11:30:04 -0700

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
--- Begin Message --- Subject: Re: x-display-pixel-width does NOT return current display width correctly Date: Tue, 16 Sep 2008 10:03:23 -0700 User-agent: Gnus/5.1100000000000003 (Gnus v5.11) Emacs/22.2 (cygwin)
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
>   =================================================




--- End Message ---
--- Begin Message --- Subject: Re: x-display-pixel-width does NOT return current display width correctly Date: Thu, 18 Sep 2008 14:27:07 -0400
I've just checked in a fix.  Thanks for the report.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]