D5773: [WIP] workarounds for menu positioning

2017-05-12 Thread Marco Martin
This revision was automatically updated to reflect the committed changes.
Closed by commit R242:680a8a9e2832: [WIP] workarounds for menu positioning 
(authored by mart).

REPOSITORY
  R242 Plasma Framework (Library)

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D5773?vs=1=14445

REVISION DETAIL
  https://phabricator.kde.org/D5773

AFFECTED FILES
  src/declarativeimports/plasmacomponents/qmenu.cpp

To: mart, #plasma, #plasma_on_wayland, davidedmundson
Cc: davidedmundson, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, hein, 
lukas


D5773: [WIP] workarounds for menu positioning

2017-05-12 Thread David Edmundson
davidedmundson added a comment.


  don't keep [WIP} in the title though :)

REPOSITORY
  R242 Plasma Framework (Library)

BRANCH
  arcpatch-D5773

REVISION DETAIL
  https://phabricator.kde.org/D5773

To: mart, #plasma, #plasma_on_wayland, davidedmundson
Cc: davidedmundson, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, hein, 
lukas


D5773: [WIP] workarounds for menu positioning

2017-05-12 Thread David Edmundson
davidedmundson accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R242 Plasma Framework (Library)

BRANCH
  arcpatch-D5773

REVISION DETAIL
  https://phabricator.kde.org/D5773

To: mart, #plasma, #plasma_on_wayland, davidedmundson
Cc: davidedmundson, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, hein, 
lukas


D5773: [WIP] workarounds for menu positioning

2017-05-12 Thread Marco Martin
mart updated this revision to Diff 1.
mart added a comment.
Restricted Application edited projects, added Plasma on Wayland; removed Plasma.


  - remove duplication

REPOSITORY
  R242 Plasma Framework (Library)

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D5773?vs=14438=1

BRANCH
  arcpatch-D5773

REVISION DETAIL
  https://phabricator.kde.org/D5773

AFFECTED FILES
  src/declarativeimports/plasmacomponents/qmenu.cpp

To: mart, #plasma, #plasma_on_wayland
Cc: davidedmundson, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, hein, 
lukas


D5773: [WIP] workarounds for menu positioning

2017-05-12 Thread David Edmundson
davidedmundson added inline comments.

INLINE COMMENTS

> qmenu.cpp:117
> +m_menu->windowHandle()->setTransientParent(item->window());
> +}
>  }

we always do this in ::open()

so why have this chunk?

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D5773

To: mart, #plasma, #plasma_on_wayland
Cc: davidedmundson, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas


D5773: [WIP] workarounds for menu positioning

2017-05-12 Thread Marco Martin
mart updated this revision to Diff 14438.
mart added a comment.
Restricted Application edited projects, added Plasma; removed Plasma on Wayland.


  - more aggressive reparenting in open()

REPOSITORY
  R242 Plasma Framework (Library)

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D5773?vs=14311=14438

BRANCH
  arcpatch-D5773

REVISION DETAIL
  https://phabricator.kde.org/D5773

AFFECTED FILES
  src/declarativeimports/plasmacomponents/qmenu.cpp

To: mart, #plasma, #plasma_on_wayland
Cc: davidedmundson, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas


D5773: [WIP] workarounds for menu positioning

2017-05-11 Thread David Edmundson
davidedmundson added inline comments.

INLINE COMMENTS

> qmenu.cpp:322-327
> +if (parentItem) {
> +//create the QWindow
> +m_menu->winId();
> +m_menu->windowHandle()->setTransientParent(parentItem->window());
> +}
>  }

why not just also do the code at line 113 here? will be simpler code all round.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D5773

To: mart, #plasma, #plasma_on_wayland
Cc: davidedmundson, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, hein, 
lukas


D5773: [WIP] workarounds for menu positioning

2017-05-08 Thread Marco Martin
mart updated this revision to Diff 14311.
mart added a comment.
Restricted Application edited projects, added Plasma on Wayland; removed Plasma.


  apply workaround when we have only parentItem

REPOSITORY
  R242 Plasma Framework (Library)

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D5773?vs=14299=14311

BRANCH
  phab/menuposworkaround

REVISION DETAIL
  https://phabricator.kde.org/D5773

AFFECTED FILES
  src/declarativeimports/plasmacomponents/qmenu.cpp

To: mart, #plasma, #plasma_on_wayland
Cc: davidedmundson, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, lukas


D5773: [WIP] workarounds for menu positioning

2017-05-08 Thread David Edmundson
davidedmundson added a comment.


  looks sensible.
  
  Is this only needed for a specific version of Qt? In either case can you 
check on the Qt 5.7 machine.

INLINE COMMENTS

> qmenu.cpp:112
> +
> +QQuickItem *item = qobject_cast(m_visualParent.data());
> +if (item) {

there's a code path in open that says:

  if (m_visualParent) {
   parentItem = qobject_cast(m_visualParent.data());
   } else {
   parentItem = qobject_cast(parent());
   }

does this not need doing for the latter branch?

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D5773

To: mart, #plasma, #plasma_on_wayland
Cc: davidedmundson, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas


D5773: [WIP] workarounds for menu positioning

2017-05-08 Thread Marco Martin
mart created this revision.
Restricted Application added projects: Plasma, Frameworks.
Restricted Application added subscribers: Frameworks, plasma-devel.

REVISION SUMMARY
  this ensure two things:
  
  - submenus have the main menu as transientParent
  - the visualParent window() is used as transientParent, if exists
  
  this partly fixes popup positioning in wayland, tough
  the main taskbar menu is still mis positioned

TEST PLAN
  submenus ok, taskbar contextmenus only partially fixed

REPOSITORY
  R242 Plasma Framework (Library)

BRANCH
  phab/menuposworkaround

REVISION DETAIL
  https://phabricator.kde.org/D5773

AFFECTED FILES
  src/declarativeimports/plasmacomponents/qmenu.cpp

To: mart, #plasma
Cc: plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas


D5773: [WIP] workarounds for menu positioning

2017-05-08 Thread Marco Martin
mart added a reviewer: Plasma on Wayland.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D5773

To: mart, #plasma, #plasma_on_wayland
Cc: plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas