[patch] PlasmaApp::adjustSize with multiple monitors

Aaron J. Seigo aseigo at kde.org
Mon Aug 25 15:46:58 CEST 2008


On Monday 25 August 2008, Guillaume Pothier wrote:
> 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?

odd indeed; perhaps Aike has some insight/thoughts on this issue as he's been 
working on this as his SoC project.

> 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
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel


-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080825/bed36842/attachment.sig 


More information about the Plasma-devel mailing list