You will find weird behavior about the function: x-display-pixel-width.
In Emacs 24.4, the function return the width of your all monitors.
This is the description in Emacs 24.4:
x-display-pixel-width is a built-in function in `C source code'.
(x-display-pixel-width &optional TERMINAL)
Return the width in pixels of the Nextstep display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On "multi-monitor" setups this refers to the pixel width for all
physical monitors associated with TERMINAL. To get information for
each physical monitor, use `display-monitor-attributes-list'.
This is the description in Emacs 24.3:
x-display-pixel-width is a built-in function in `C source code'.
(x-display-pixel-width &optional DISPLAY)
Return the width in pixels of the Nextstep display DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame, a display name (a string), or terminal ID.
If omitted or nil, that stands for the selected frame's display.