RFR: 8280994: [XWayland] Drag and Drop does not work in java -> wayland app direction [v2]
Alexander Zvegintsev
azvegint at openjdk.org
Mon Jun 5 12:08:06 UTC 2023
On Mon, 5 Jun 2023 06:50:01 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> Not sure what is the purpose of `win != 0 && isXWaylandDndAwareWindow()`, it'll change the behavior for the X11 session(isXWaylandDndAwareWindow is always false in this case).
>>
>> `findClientWindow` is a recursive function, and the `isXWaylandDndAwareWindow` check is already performed within the call from line 442.
>
> Yes, since it's a recursive function, I was just trying to understand if `isXWaylandDndAwareWindow `is called at right place
> I tried a simple recursive program similar to `findClientWindow `which gives StackOverflowError so I was thinking if `findClientWindow `can also give SOF and whether we should call `isXWaylandDndAwareWindow ` at l446 or l439
>
>
> public class Recursion {
> public static void main(String[] args) {
> long value = 22;
> System.out.println(test(value));
> }
>
> private static long test(long value) {
> long arr[] = {1L,2L,3L};
> for (long i : arr) {
> long val = test(i);
> if (val != 0) {
> System.out.println("val " + val);
> return val;
> }
> }
> if (getValue(value) == 22) {
> return value;
> }
> return 0;
> }
> private static long getValue(long value) {
> return value;
> }
> }
Yes, this could happen if the implementation changes, currently the dummy window has no children.
Updated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14266#discussion_r1217973252
More information about the client-libs-dev
mailing list