Retrieve parent window ID for XDG desktop portal dialogs
Created by: gasinvein
Follow-up from https://github.com/crow-translate/crow-translate/pull/429#issuecomment-1126707432, attempt to fix #430
It doesn't crash anymore even if we don't check if the active window isn't nullptr
, but I'm still not sure if this way to determine parent_window
ID for XDP is correct. Looks like it is for X11, but not for Wayland.