I searched a little further. I created a stand alone qt app that uses qdesktopwidget. I could observe that the size of QApplication::desktop()->geometry(); changes when the workAreaResized() signal is emited. But when screenCountChanged() is emited, it is not. So when you get a screen added signal, the desktop size has not yet changed. For me, thats a bug.But it could just be wanted that way. So either the pager needs to be fixed to know that, or kephal changed because for me it seem unintuitive the way it is now, or qt needs to be changed. If somebody wants the stand alone test app, tell me.
Have a nice day (and akademy!) Beat Wolf Am Donnerstag 01 Juli 2010, um 10.15:21 schrieb Asraniel: > Hi, > > i discovered yesterday that when i add or remove a screen on kde 4.5 rc1, > the aspect ratio of the pager changes. This is the wanted behaviour. BUT, > it only changes when i resize the panel at least one pixel after the > screen change. I the searched a little and thought that the pager does not > get the screen added/removed singal. But it does. > I then saw this code: > > qreal ratio = (qreal)Kephal::ScreenUtils::desktopGeometry().width() / > (qreal)Kephal::ScreenUtils::desktopGeometry().height(); > > so, this takes the geometry of the desktop and calculates the ratio for the > pager. Sounds absolutely correct. So why does it not do it? > > I then outputed the Kephal::ScreenUtils::desktopGeometry() value, and > discovered that even that we got the signal that a screen was added (or > removed), that value was actually the old value before the change. > > Kephal::ScreenUtils::numScreens() on the other hand returned the correct > amount of screends. > > I then changed the first code for the ration into the following: > > QRect tempRect; > for(int i = 0; i < Kephal::ScreenUtils::numScreens(); i++){ > tempRect |= Kephal::ScreenUtils::screenGeometry(i); > } > > qreal ratio = (qreal)tempRect.width() / (qreal)tempRect.height(); > > and everything worked perfectly. > > Now, is this a kephal bug? or a qt bug? from looking at the code kephal > does little more than use qdesktopwidget and send those signals to plasma. > > I suspect that this could cause some of the other multiscreen bugs. > > I didn't want to patch kephal, who knows, perhaps that is the wanted > behaviour, so i could just patch the pager to work correctly. > > Feedback? > > have a nice day. > _______________________________________________ > Plasma-devel mailing list > Plasma-devel@kde.org > https://mail.kde.org/mailman/listinfo/plasma-devel _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel