Kirill Grouchnikov
10/28/2021, 7:41 PMModifier.pointerInput
to Modifier.mouseClickable
. At the very end it says If you need more information about events there is an available raw AWT mouse event object in mouseEvent property of PointerEvent
but it's not clear where is that PointerEvent
. More specifically, what is the equivalent of MouseEvent.isPopupTrigger
- which is pressed on mac, but released on windows?Kirill Grouchnikov
10/29/2021, 2:35 PMModifier.pointerInput(Unit) {
while (true) {
val lastMouseEvent = awaitPointerEventScope { awaitPointerEvent() }.mouseEvent
if (lastMouseEvent?.isPopupTrigger) {
...
}
}
}
Kirill Grouchnikov
10/29/2021, 2:36 PMIgor Demin
10/29/2021, 5:05 PMIgor Demin
10/29/2021, 5:50 PMKirill Grouchnikov
10/29/2021, 6:02 PMKirill Grouchnikov
10/29/2021, 6:02 PMIgor Demin
10/29/2021, 6:20 PMKirill Grouchnikov
10/29/2021, 6:21 PMisPopupTrigger
? 🙂Kirill Grouchnikov
10/29/2021, 6:22 PMIgor Demin
10/29/2021, 6:31 PMAny chance to get the equivalent ofÂAt the first glance, it looks like it shouldn't be as a part of? 🙂isPopupTrigger
PointerEvent
, as it implementation details of Popup, not Event. Maybe we can provide something like this in the future:
interface PopupConfiguration {
fun isPopupTrigger(event: PointerEvent)
companion object {
val Platform = ...
}
}
but not sure, we need to design it.
something already wired in text views for showing context menusActually now we open Context menu always on press, not on release. I think, we should fix that for Windows/Linux(?)
Kirill Grouchnikov
10/29/2021, 6:35 PMKirill Grouchnikov
10/29/2021, 6:35 PMKirill Grouchnikov
10/29/2021, 6:37 PMKirill Grouchnikov
10/29/2021, 6:39 PMMouseEvent.isPopupTrigger
Igor Demin
10/29/2021, 7:00 PMIdeally it would be aligned with the platform guidelines to be consistent for the user across their apps on their machineYes, Compose should comply guidelines of the platform, on which it runs, as much as possible for non-native application. I am not sure about "look", as it can be the same on all platforms (or just implement some other design system, such Material), but sure about "feel", as non-native feel would look weird for users.