<p>I use <a href="http://files.emacsblog.org/ryan/elisp/maxframe.el" rel="noreferrer">maxframe.el</a> to maximize my Emacs frames.</p>

<p>It works great on all three major platforms, except on my dual-head Mac setup (Macbook Pro 15-inch laptop with 23-inch monitor). </p>

<p>When maximizing an Emacs frame, the frame expands to fill the width of <em>both</em> monitors and the height of the larger monitor. </p>

<p>Obviously, I would like the frame to maximize to fill only the monitor it's on. How can I detect the resolutions of the two individual monitors using elisp? </p>

<p>Thanks,
Jacob</p>

<p>EDIT: As Denis points out, setting mf-max-width is a reasonable workaround. But (as I should have mentioned) I was hoping for a solution that works on both monitors and with any resolution. Maybe something OSX-specific in the style of the Windows-specific w32-send-sys-command. </p>

Does customising `mf-max-width' work?  Its documentation:
```
```
"*The maximum display width to support.  This helps better support the true
nature of display-pixel-width.  Since multiple monitors will result in a
very large display pixel width, this value is used to set the stop point for
maximizing the frame.  This could also be used to set a fixed frame size
without going over the display dimensions."
```
```