[patch] PlasmaApp::adjustSize with multiple monitors
Guillaume Pothier
gpothier at gmail.com
Mon Aug 25 15:20:14 CEST 2008
Following up on this issue.
The code in Qt that emits the resized signal is in
qapplication_x11.cpp, line 2998:
int scr = XRRRootToScreen(X11->display, event->xany.window);
QWidget *w = desktop()->screen(scr);
QSize oldSize(w->size());
w->data->crect.setWidth(DisplayWidth(X11->display, scr));
w->data->crect.setHeight(DisplayHeight(X11->display, scr));
if (w->size() != oldSize) {
QResizeEvent e(w->size(), oldSize);
QApplication::sendEvent(w, &e);
emit desktop()->resized(scr);
}
Someone knows xrandr enough to understand why XRRRootToScreen would
always return 0?
Regards,
g
On Sat, Aug 23, 2008 at 8:45 PM, Guillaume Pothier <gpothier at gmail.com> wrote:
> Hi,
> This is related to http://bugs.kde.org/show_bug.cgi?id=163676
> It seems there is indeed a problem with QDesktopWidget. When I resize
> my external monitor, the resize signal is fired with screen=0,
> although the screen whose size changed is screen 1. Thus adjustSize
> doesn't adjust the size of the panel, which I put on screen 1.
>
> So as a workaround I wrote a hack that calls adjustSize for each
> screen when we receive the signal. This works fine, at least on my
> machine. The patch is attached. I'll try to have a look at
> QDesktopWidget, but in the meantime this patch seems useful.
>
> Regards,
> g
>
More information about the Plasma-devel
mailing list