-
Notifications
You must be signed in to change notification settings - Fork 87
Clarify usage of compose.swing.render.on.graphics
flag
#2071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: jb-main
Are you sure you want to change the base?
Changes from 1 commit
ae394fd
2390983
0bc5938
7da0196
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ internal class ComposeWindowPanel( | |
container = this, | ||
skiaLayerAnalytics = skiaLayerAnalytics, | ||
window = window, | ||
useSwingGraphics = false, | ||
useSwingGraphics = false, // Swing graphics is not supposed to be used here. | ||
layerType = ComposeFeatureFlags.layerType.let { | ||
// LayerType.OnComponent may can only be used with rendering via Swing graphics, | ||
// but it's always disabled here. Using fallback instead of [check] to support | ||
|
@@ -101,6 +101,11 @@ internal class ComposeWindowPanel( | |
override fun getDefaultComponent(aContainer: Container?) = null | ||
} | ||
isFocusCycleRoot = true | ||
|
||
if (ComposeFeatureFlags.useSwingGraphics) { | ||
println("Usage of \"compose.swing.render.on.graphics\" affect only behaviour of ComposePanel." + | ||
"Usage together with ComposeWindow or ComposeDialog won't have any effect.") | ||
} | ||
Comment on lines
+105
to
+108
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure about printing this. The flag is for the entire process, but you can have both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True. The intention here is to notify already wrong configured applications. Ideas are welcome There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this a global flag, though? Can we not make it an argument to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Already thought about it, so yes we can. But I don't really won't to remove global flag because despite "experimental" status it's widely adopted There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It was introduced in #601, so for now it's "historically" I guess There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exposed as another optional/experimental parameter in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great! As for this print, I think I personally would prefer not to pollute the output, but I'd leave the decision to @igordmn . There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is valid to open a As for a flag, I prefer an argument over it. For historical reasons we can either keep it, or deprecate it. |
||
} | ||
|
||
override fun setBounds(x: Int, y: Int, width: Int, height: Int) { | ||
|
Uh oh!
There was an error while loading. Please reload this page.