summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2017-05-29 16:52:48 +0200
committerElvis Angelaccio <[email protected]>2017-05-29 16:52:48 +0200
commite932b113b2d9ee7b792c23057ea2e15f8ea4f9c5 (patch)
tree142cbddd289e581e0eb3930f3cf356fc68b49cc6
parentbe45a3a8e710188feacfff8bf3aa6d637080c516 (diff)
Fix context menu position on Wayland
On Wayland popup menus without a parent won't have a transient parent window, which is required to show the menu in the right position. The context menu in the archiveview is created by kxmlgui, without a parent because it was a top-level <Menu> tag. If we define it as child of the <MainWindow> tag, we ensure that the main window will be used as parent of the menu.
-rw-r--r--part/ark_part.rc34
1 files changed, 18 insertions, 16 deletions
diff --git a/part/ark_part.rc b/part/ark_part.rc
index d27dae6..9cfe5c2 100644
--- a/part/ark_part.rc
+++ b/part/ark_part.rc
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui>
-<kpartgui name="ark_part" version="17" translationDomain="ark">
+<kpartgui name="ark_part" version="18" translationDomain="ark">
<MenuBar>
<Menu name="archive">
<text>&amp;Archive</text>
@@ -40,19 +40,21 @@
<Action name="add"/>
<Action name="delete"/>
</ToolBar>
-<Menu name="context_menu">
- <Action name="preview"/>
- <Action name="openfile"/>
- <Action name="openfilewith"/>
- <Separator/>
- <Action name="rename"/>
- <Action name="delete"/>
- <Action name="extract"/>
- <Separator/>
- <Action name="cut"/>
- <Action name="copy"/>
- <Action name="paste"/>
- <Separator/>
- <Action name="add"/>
-</Menu>
+<MainWindow>
+ <Menu name="context_menu">
+ <Action name="preview"/>
+ <Action name="openfile"/>
+ <Action name="openfilewith"/>
+ <Separator/>
+ <Action name="rename"/>
+ <Action name="delete"/>
+ <Action name="extract"/>
+ <Separator/>
+ <Action name="cut"/>
+ <Action name="copy"/>
+ <Action name="paste"/>
+ <Separator/>
+ <Action name="add"/>
+ </Menu>
+</MainWindow>
</kpartgui>