Open prateekmedia opened 3 years ago
I believe this is a duplicate of https://github.com/bitsdojo/bitsdojo_window/issues/78
You can use that temporary solution for now but I will also implement this in the upcoming release.
Please follow that issue for updates.
Reopening this due to this requirement:
detect if it's a linux or windows phone
For now you can use a condition to show those widgets or not. I will eventually implement this in the future as part of the package.
The detection should be based on whether the OS is in phone mode or not, not based on the ARM architecture. There are ARM-based Linux devices out there as well — e.g. the Pinebook Pro. You can also run Linux in a VM on an ARM-based Macbook. And it's likely there will be more ARM-based PCs being released in the future.
Hello everyone, I found out the solution for linux
It turns out you can get if you can show the close, minimize or maximize using below link https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm46409506266144
_NET_WM_ALLOWED_ACTIONS is the name of the window manager spec and can be used to compare these.
Looking at the pattern in the code I think the relevant cpp command would be below one, although I am not sure
gdk_x11_screen_get_window_manager_allowed_actions(screen);
For Windows the below link will help https://social.msdn.microsoft.com/Forums/vstudio/en-US/e15cc1b8-e743-4749-9648-110e89391444/compiletime-detection-of-windows-platform-?forum=wpdevelop
#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
// This code is for Win32 desktop apps
This is the code, here only define the windows button properties when this is true otherwise it is a Microsoft store app or Mobile app as mentioned in the API
@bitsdojo Are you still working on this plugin? You seems quite inactive and in critical fixes only mode.
When using linux you also have an option to use arm devices like pine phone or libre phone, but when I added the code for window buttons then they will also appear at the top left even if it's a phone and no app require window controls.
So would it be possible to detect if it's a linux or windows phone and hide window buttons for that specific devices.