| Summary: | Hot Corners are not triggered when showing fullscreen KWin Script | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Michail Vourlakos <mvourlakos> |
| Component: | scripting | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | kde.org |
| Priority: | NOR | ||
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
Thomas I had tested in master around 5 days ago but it didnt fix my case... I can test it again if you want... The patch is (not yet ;-) committed. Or do you mean you had applied the patch to master and it didn't change anything? Since your fullscreen window should be a popup it will likely grab the mouse. In that case the " if (QWidget::mouseGrabber())" branch should hit, if not, we should figure why (eg. because the mouse is not grabbed by your popup?!) or because there's an additional effect input window (the branch right above) - where you would have to implement screencorner reaction yourself then. I had applied the patch myself but the script had the same behavior with the past.
( I tried xprop for example but I couldnt grab the mouse again).
>where you would have to implement screencorner reaction yourself then.
I was thinking to try that but I would like to avoid it....
(In reply to comment #4) > I tried xprop for example but I couldnt grab the mouse again That suggests that the mouse is grabbed (by your popup) and that suggests that kwin should receive the event and forward it to the screencorner before actually handling it. (Eg. this works w/ regular popups like the alt+f3 menu, tried that) > I was thinking to try that but I would like to avoid it.... Either you already implement a fullscreen input window - than it's one or two more LOC or you do not - then you would not be hit by that code path and the windowgrabber test should get you the corner action. -> please apply the patch and trace it (eg. add some qDebug() << "stage 1"; - running kwin in gdb is less pleasant ;-) > That suggests that the mouse is grabbed (by your popup) and that suggests
> that kwin should receive the event and forward it to the screencorner
> before actually handling it. (Eg. this works w/ regular popups like the
> alt+f3 menu, tried that)
Yeah it's a Qt.Popup so it grabs mouse. I'm planning to add more control for
that in KWin scripting - hit a wall yesterday with Plasma.Dialog in Present
Windows 2.
Well from the qDebug in events.cpp:
qDebug() << "stage8...";
#ifdef KWIN_BUILD_SCREENEDGES
qDebug() << "stage6...";
if (QWidget::mouseGrabber()) {
qDebug() << "stage7...";
.
.
.
}
-----------------
it shows stage8 and stage6 but it doesnt get into stage7...
More information about the kwin script behavior. If I reduce the width and height of the Dialog and center it in the screen then the screen edges work. Problem occurs when the Dialog is fullscreen (by fullscreen I mean that its width and height are equal to the screen size and I havent set any flag to say that the dialog is fullscreen)
any ideas?
(In reply to comment #7) > it shows stage8 and stage6 but it doesnt get into stage7... Means the pointer is not grabbed (through KWin/Qt at least) You wouldn't get past this w/o actively grabbing the mouse on the window then (or have the ability to raise the screenedges exported to scripting but i had frankly hoped we could get rid of that altogether) How's the fullscreen window created (and esp. by what attributes)? (This is somehow weird, because it works for sure with QMenu popups and iirc kwin grabs the pointer for the killwindow and the moveresize mode) in main qml file:
PlasmaCore.Dialog {
id: dialog
visible: false
windowFlags: Qt.Popup
x:0
y:0
mainItem: mainDialogItem
}
Component.onCompleted:{
var screen = workspace.clientArea(KWin.ScreenArea, workspace.activeScreen, workspace.currentDesktop);
mainDialogItem.width = screen.width;
mainDialogItem.height = screen.height;
}
Just tested, "setWindowFlags(Qt::Popup)" grabs the mouse but does not set mouseGrabber (meeh...) you'd have to actively grabMouse() (and -good god- releaseMouse()!!! later on) for that. Less than ideal. (In reply to comment #10) > Just tested, "setWindowFlags(Qt::Popup)" grabs the mouse but does not set > mouseGrabber (meeh...) you'd have to actively grabMouse() (and -good god- > releaseMouse()!!! later on) for that. > > Less than ideal. To be honest, I dont know how to do from QML what you are describing... :) On the other hand if I have understood correctly from Martin's comments, the approach of PlasmaCore.Dialog in KWin scripts will not be the optimal but a new approach will be followed. In that case I dont know if it matters that much to try support this if from e.g 4.11 a new way appears that fixes many issues of PlasmaCore.Dialog... > > Just tested, "setWindowFlags(Qt::Popup)" grabs the mouse but does not set
> > mouseGrabber (meeh...) you'd have to actively grabMouse() (and -good god-
> > releaseMouse()!!! later on) for that.
> >
> > Less than ideal.
>
> To be honest, I dont know how to do from QML what you are describing... :)
> On the other hand if I have understood correctly from Martin's comments, the
> approach of PlasmaCore.Dialog in KWin scripts will not be the optimal but a
> new approach will be followed. In that case I dont know if it matters that
> much to try support this if from e.g 4.11 a new way appears that fixes many
> issues of PlasmaCore.Dialog...
yes, I'm working on a new way and already have a KWin.Window which replaces
PlasmaCore.Dialog. I'm quite optimistic that I can put up a review request
tomorrow. The mouse grabbing will probably not yet get implemented as I first
want to change a little bit in the effects to share code. General idea is to
add an input only window just like with fullscreen effects.
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone! Dear Bug Submitter, This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand. Thank you for helping us make KDE software even better for everyone! This issue report is quite old and from the comments it's not clear it it has been fixed or not. Can you please confirm, that it still persists with Plasma 5.23? Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |
Hot Corners are not triggered when a fullScreen KWin Script. The hot corners can call the script to be shown but afterwards the hot corner can not be used to close it. example code: registerScreenEdge(KWin.ElectricBottomLeft, function () { toggleBoth(); }); P.S. in Plasma Desktop 4.10 there is a crash because of the above code which has been fixed in master. Reproducible: Always