Mercurial > dwindows
diff gtk3/dw.c @ 2506:fa976a5bc7bd
Add DW_FEATURE_WINDOW_PLACEMENT for platforms supporting arbitrary window placement.
Several of the new platforms supported do not allow arbitrary window placement.
GTK3/4 with Wayland does not allow you to specify the location, just the size.
iOS and Android by default the window is the full screen, or fraction of it.
GTK2/3/4 with X11, Windows, OS/2 and MacOS support arbitrary window placement.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 06 May 2021 23:19:46 +0000 |
parents | ed955edc7204 |
children | eaac1317b851 |
line wrap: on
line diff
--- a/gtk3/dw.c Thu May 06 22:02:49 2021 +0000 +++ b/gtk3/dw.c Thu May 06 23:19:46 2021 +0000 @@ -12640,6 +12640,21 @@ case DW_FEATURE_MLE_WORD_WRAP: case DW_FEATURE_TREE: return DW_FEATURE_ENABLED; +#ifdef GDK_WINDOWING_X11 + case DW_FEATURE_WINDOW_PLACEMENT: + { + int _locked_by_me = FALSE, retval = DW_FEATURE_UNSUPPORTED; + GdkDisplay *display; + + DW_MUTEX_LOCK; + display = gdk_display_get_default(); + + if(display && GDK_IS_X11_DISPLAY(display)) + retval = DW_ERROR_ENABLED; + DW_MUTEX_UNLOCK; + return retval; + } +#endif default: return DW_FEATURE_UNSUPPORTED; } @@ -12683,6 +12698,21 @@ case DW_FEATURE_MLE_WORD_WRAP: case DW_FEATURE_TREE: return DW_ERROR_GENERAL; +#ifdef GDK_WINDOWING_X11 + case DW_FEATURE_WINDOW_PLACEMENT: + { + int _locked_by_me = FALSE, retval = DW_FEATURE_UNSUPPORTED; + GdkDisplay *display; + + DW_MUTEX_LOCK; + display = gdk_display_get_default(); + + if(display && GDK_IS_X11_DISPLAY(display)) + retval = DW_ERROR_GENERAL; + DW_MUTEX_UNLOCK; + return retval; + } +#endif /* These features are supported and configurable */ default: return DW_FEATURE_UNSUPPORTED;