Bug 371510 - tray context menu popup with window frame and taskbar entry
Summary: tray context menu popup with window frame and taskbar entry
Status: RESOLVED FIXED
Alias: None
Product: frameworks-knotifications
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.26.0
Platform: Chakra Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Klapetek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-23 06:09 UTC by nihui
Modified: 2021-08-09 17:07 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot (86.35 KB, image/png)
2016-10-23 06:10 UTC, nihui
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nihui 2016-10-23 06:09:08 UTC
it may be a regression in the fix of bugs.kde.org/show_bug.cgi?id=335015

if the context menu is the associated widget, the menu will popup with ugly window frame and taskbar entry when activated.

Here is an example that reproduces this issue.

#include <QApplication>
#include <QAction>
#include <QMenu>
#include <KStatusNotifierItem>

int main(int argc, char** argv)
{
    QApplication app(argc, argv);

    QWidget mainwindow;

    KStatusNotifierItem* tray = new KStatusNotifierItem(&mainwindow);

    tray->setAssociatedWidget(tray->contextMenu());

    QAction* action1 = new QAction("action1", &mainwindow);
    QAction* action2 = new QAction("action2", &mainwindow);
    QAction* action3 = new QAction("action3", &mainwindow);
    tray->contextMenu()->addAction(action1);
    tray->contextMenu()->addAction(action2);
    tray->contextMenu()->addAction(action3);

    mainwindow.show();

    return app.exec();
}


Reproducible: Always

Steps to Reproduce:
1. compile and run my sample code
2. left click tray icon

Actual Results:  
tray context menu popup with window frame and taskbar entry

Expected Results:  
tray context menu popup without window frame or taskbar entry

chakra linux
qt 5.7.0
kde framework 5.26.0
kernel 4.5.7
Comment 1 nihui 2016-10-23 06:10:31 UTC
Created attachment 101711 [details]
screenshot

add screenshot
Comment 2 Christoph Feck 2016-10-24 04:02:13 UTC
That commit is quite old, but adding committer anyway for inspection.
Comment 3 Nate Graham 2021-08-09 17:07:53 UTC
This is fixed now.