[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-12-18 Thread Andrea Scarpino
https://bugs.kde.org/show_bug.cgi?id=356523

Andrea Scarpino  changed:

   What|Removed |Added

 CC||a.fetto...@gmail.com

--- Comment #25 from Andrea Scarpino  ---
*** Bug 372056 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-12-02 Thread Anthony
https://bugs.kde.org/show_bug.cgi?id=356523

Anthony  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|CONFIRMED   |RESOLVED

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-12-02 Thread Anthony
https://bugs.kde.org/show_bug.cgi?id=356523

--- Comment #24 from Anthony  ---
Git commit 6198841710fb128987c308bd3ef3ff8cbd294ce0 by Anthony Fieroni.
Committed on 03/12/2016 at 06:50.
Pushed by anthonyfieroni into branch 'master'.

[KStatusNotifierItem] Save / restore widget position during hide / restore it
window

REVIEW: 127216

Signed-off-by: Anthony Fieroni 

M  +24   -5src/kstatusnotifieritem.cpp
M  +1-0src/kstatusnotifieritemprivate_p.h

https://commits.kde.org/knotifications/6198841710fb128987c308bd3ef3ff8cbd294ce0

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-03-28 Thread David Edmundson via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

--- Comment #23 from David Edmundson  ---
*** Bug 360949 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-03-28 Thread David Edmundson via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

David Edmundson  changed:

   What|Removed |Added

 CC||ave...@email.arizona.edu

--- Comment #22 from David Edmundson  ---
*** Bug 360948 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-03-28 Thread David Edmundson via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

David Edmundson  changed:

   What|Removed |Added

 CC||gerhardhe...@outlook.com

--- Comment #21 from David Edmundson  ---
*** Bug 360826 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-01-27 Thread Thomas Lübking via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

--- Comment #20 from Thomas Lübking  ---
Either the window was undecorated or the call to the wininfo was made before it
was decorated by the WM (in either case frameGeometry() and geometry() are
equal)

Why there's this complex code, also preserving the current desktop, is frankly
beyond me - QWidget::hide() withdraws the X drawable, but doesn't destroy it -
so properties like the VD and the geometry should be preserved; QWidget::hide()
/ QWidget::show() should™ really just work.

The only thing I could imagine is that the client code in addition nukes the
widget (destroying the drawable) and adds a new associate (w/o caring about
former properties) - however then also the X properties (KWinInfo geometry)
should be nonsense...

My uninformed suggestion was to explicitly store the position QWidget::pos()
like the virtual desktop and restore to that QPoint *shrug*

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-01-27 Thread Martin Klapetek via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

--- Comment #14 from Martin Klapetek  ---
> Any results here?

No.

@Thomas
> Actually™ you should not have to explicitly set the current geometry

I did some testing - if I remove this call completely, the placement is
fully random from what I can tell. if I simply replace
info.frameGeometry().topLeft()
with info.topLeft(), it still gets restored to a different position. Apparently
this is to some extent due to having QT_DEVICE_PIXEL_RATIO=2 as the
widget geometry is exactly half of what KWindowInfo reports, therefore
simply telling the QWidget to move to KWindowInfo geometry moves
it twice as much.

But not just that, I've tried something like

associatedWidget->move(info.geometry().topLeft().x() / 2,
info.geometry().topLeft().y() / 2);

but it would still restore it by some random pixels off.

What does, however, seems to restore it properly is this:

associatedWidget->windowHandle()->setX(info.geometry().topLeft().x()
/2);
associatedWidget->windowHandle()->setY(info.geometry().topLeft().y()
/2);

...where the "/2" should obviously be replaced by QT_DEVICE_PIXEL_RATIO.

But now tell me if this is a good and/or valid fix.

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-01-27 Thread Thomas Lübking via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

--- Comment #15 from Thomas Lübking  ---
What if you explicity
  associatedWidget->setAttribute(Qt::WA_Moved);

(the individual sets will likely cause this whereas the combined one will
figure it's no effective change and shortcut exit)

The QT_DEVICE_PIXEL_RATIO situation is kinda worrysome.
KWindowSystem deals with real pixels (and I doubt we can just change that, we
don't know the source of the calculation), so either this is the expected
behavior for toplevel widget actions or a bug in Qt (while it makes absolutely
sense for internal widgets, global positioning is usually driven by outside
values which do not related to the locals environment)

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-01-27 Thread Martin Klapetek via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

--- Comment #16 from Martin Klapetek  ---
>   associatedWidget->setAttribute(Qt::WA_Moved);

Should just this be in or with some of the other lines? This standalone
puts it always to the bottom-left corner of my screen.

> KWindowSystem deals with real pixels

Yeah which means that the widget either needs to be move to real pixels
(ie. apply the device pixel ratio) or the window needs to be moved externally
by something else.

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-01-27 Thread Thomas Lübking via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

--- Comment #17 from Thomas Lübking  ---
This alone should do (and not even be required), but I guess there there's more
to it in the SNI case, like the widget being destroyed and recreated (so you've
not moved this widget at all, but just told the WM to believe so)

In the latter case you could either carry over the last position (and move it
in QWidget geometries, sth. like ie.

oldPosition = oldWidget->pos();

QWidget *newWidget = new QWidget;
newWidget->move(oldPosition);
newWidget->show();


---

"Something else™" cannot move the widget as eg. the WM doesn't know that this
window has been there before (or that it should restore that former geometry)

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-01-27 Thread Anthony via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

--- Comment #18 from Anthony  ---
How this works correctly before 5.15?

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-01-27 Thread Martin Klapetek via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

--- Comment #19 from Martin Klapetek  ---
That's very likely some unrelated change, this code hasn't been altered for
ages.

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-01-26 Thread Anthony via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

--- Comment #13 from Anthony  ---
Any results here?

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-01-05 Thread Thomas Lübking via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

--- Comment #12 from Thomas Lübking  ---
Actually™ you should not have to explicitly set the current geometry,
QWidget::show() should do that automagically if the widget was ever moved (by
the client code or the user) - also works for me (but *not* tested on
KNotifications explicitly)

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-01-04 Thread Martin Klapetek via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

Martin Klapetek  changed:

   What|Removed |Added

 CC||thomas.luebk...@gmail.com

--- Comment #10 from Martin Klapetek  ---
5.18 is already released, 5.19 would be the earliest.

@Thomas, is comment #8 all that is needed?

-- 
You are receiving this mail because:
You are watching all bug changes.


[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2016-01-04 Thread Thomas Lübking via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

--- Comment #11 from Thomas Lübking  ---
i don't recall the code, but if the wininfo isn't required otherwise, you can
omit it.
the widget should still have the proper geometry and Qt::WA_Moved will
(hopefully still) make Qt ask the WM to not move it elsewhere.

in either case qwidget still has the proper geometry.

sorry for forgetting to keep myself attached :-(

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-knotifications] [Bug 356523] Hide/restore window from system tray cause change it position

2015-12-12 Thread Thomas Lübking via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=356523

Thomas Lübking  changed:

   What|Removed |Added

Product|kwin|frameworks-knotifications
 Resolution|WAITINGFORINFO  |---
 Ever confirmed|0   |1
   Assignee|kwin-bugs-n...@kde.org  |mklape...@kde.org
  Component|general |general
 Status|NEEDSINFO   |CONFIRMED
 CC||kdelibs-b...@kde.org

--- Comment #7 from Thomas Lübking  ---
No problem, we get "systray does not restore position" bugreports twice a year
and it's always the client (so I simply close them - usually it's dropbox or
skype ;-)

The bug is in

void KStatusNotifierItemPrivate::minimizeRestore(bool show)
   ...
   associatedWidget->move(info.frameGeometry().topLeft()); // avoid placement
policies

=> the client is supposed to be placed at the client position, not at the
decorated position. The WM needs to add the decoration and keep the decorated
client where it is (if this is possible by other constraints)

=> Please move the client to where it is or simply set the Qt::WA_Moved flag
(latter should be sufficient, but the Qt5 surface abstraction might have
screwed it, didn't recently test)

-- 
You are receiving this mail because:
You are watching all bug changes.