Review Request: Update the location of the desktop toolbox based on overlapping containments.

Aaron Seigo aseigo at kde.org
Mon Feb 25 21:35:55 CET 2008


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://mattr.info/r/221/#review195
-----------------------------------------------------------


this will ignore other apps that claiming struts, however. perhaps using QDesktopWidget::availableGeometry(int) and the workAreaResized signal is a better approach?

also, this isn't necessary for DesktopContainments that don't have an associated screen.


trunk/KDE/kdebase/workspace/libs/plasma/containment.cpp
<http://mattr.info/r/221/#comment136>

    couple of incorrect assumptions here:
    
    a) that the containment is on the same screen() as the DesktopContainment in question
    
    b) that the DesktopContainment is even assigned to a screen
    
    c) that just because the containment has a location of top/right that it has a reserved strut: it may not. (think of "allow windows to cover" panels or autohiding panels)


- Aaron


On 2008-02-25 11:45:00, Dan Meltzer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://mattr.info/r/221/
> -----------------------------------------------------------
> 
> (Updated 2008-02-25 11:45:00)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> This patch seeks to move the toolbox when it is obstructed by another containment.  The patch makes the assumption that the toolbox should only appears on a desktop containment, which may not be desired in the future.  In this case we would probably want to add a virtual bool hasToolbox() or something along those lines.
> 
> It currently has a bug where the config needs to be "applied" twice in order for the toolbox to move to the correct position.. I"m not sure where this is coming from, if it's due to the panel taking longer to move than the reposition or if its something I'm just missing:  The following debug output is relevant:
> 
> After Clicking apply the first time, moving from top->right:
> 
>  plasma(2306)/libplasma Plasma::Containment::Private::toolboxPosition: "Desktop"  is at the:  0
> plasma(2306)/libplasma Plasma::Containment::Private::toolboxPosition: "Panel"  is at the:  6
> plasma(2306)/libplasma Plasma::Containment::Private::toolboxPosition: Moving to:  QPointF(-100, 0)
> plasma(2306) PanelView::updatePanelGeometry: New panel geometry is QRectF(0,0 1440x900)
> plasma(2306) PanelView::updatePanelGeometry: PanelView(0x82ff828) thinks its panel is at  QRect(0,0 1440x900)
> plasma(2306) PanelView::updatePanelGeometry: New panel geometry is QRectF(0,0 32x900)
> plasma(2306) PanelView::updatePanelGeometry: PanelView(0x82ff828) thinks its panel is at  QRect(1408,0 32x900)
> plasma(2306) PanelView::updatePanelGeometry: New panel geometry is QRectF(1408,0 32x900)
> plasma(2306) PanelView::updatePanelGeometry: PanelView(0x82ff828) thinks its panel is at  QRect(1408,0 32x900)
> plasma(2306) PanelView::updatePanelGeometry: New panel geometry is QRectF(1408,0 39x900)
> plasma(2306) PanelView::updatePanelGeometry: PanelView(0x82ff828) thinks its panel is at  QRect(1401,0 39x900)
> plasma(2306) PanelView::updatePanelGeometry: New panel geometry is QRectF(1401,0 39x900)
> plasma(2306) PanelView::updatePanelGeometry: PanelView(0x82ff828) thinks its panel is at  QRect(1401,0 39x900)
> 
> After clicking apply again, after the panel is on the right:
> 
> plasma(2306)/libplasma Plasma::Containment::Private::toolboxPosition: "Desktop"  is at the:  0
> plasma(2306)/libplasma Plasma::Containment::Private::toolboxPosition: "Panel"  is at the:  6
> plasma(2306)/libplasma Plasma::Containment::Private::toolboxPosition: Moving to:  QPointF(1301, 0)
> 
> 
> I've left the debug output in the patch to allow people to match this previous text up with where it occurs.  It will be removed before committing.
> 
> 
> This addresses bug 158405.
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdebase/workspace/libs/plasma/containment.h
>   trunk/KDE/kdebase/workspace/libs/plasma/containment.cpp
>   trunk/KDE/kdebase/workspace/libs/plasma/corona.h
>   trunk/KDE/kdebase/workspace/libs/plasma/corona.cpp
>   trunk/KDE/kdebase/workspace/plasma/containments/panel/panel.cpp
> 
> Diff: http://mattr.info/r/221/diff
> 
> 
> Testing
> -------
> 
> Have run plasma with this patch and moved the panel around.  Other than the problem described above it is working nicely.
> 
> 
> Thanks,
> 
> Dan
> 
>



More information about the Panel-devel mailing list