termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
1.96k stars 301 forks source link

[Proposal]: X11 Multiwindow support #715

Closed IntinteDAO closed 2 weeks ago

IntinteDAO commented 2 weeks ago

Problem description

I don't know if this is possible in the Android environment. This is a feature that all sorts of X Servers have (for Windows, some for Linux). In a nutshell, it consists in the fact that the X server runs in the background, so to speak, and each application is somehow transmitted separately.

It is potentially possible to run applications with separate sockets, although it usually runs all on one.

In a nutshell, it looks as if each application is running on a "real" system, instead of running a full X server with a session.

Such a thing will (potentially) reduce resources and increase the imersion of using the application.

obraz obraz ^ Examples

What steps will reproduce the bug?

x

What is the expected behavior?

No response

Biswa96 commented 2 weeks ago

Have you tried any window manager or desktop environment in termux-x11? More info at https://wiki.termux.com/wiki/Graphical_Environment

twaik commented 2 weeks ago

Android Window system integration is not possible due to a lot of differences between Android and regular Linux distro windowing systems and restrictions of Android windowing system itself. Examples:

  1. There is no API to switch between fullscreen and freeform mode.
  2. There is no API to create windows. The only thing you can create is a Task which will be represented in Recents screen or on taskbar in the case of desktop mode or Samsung Dex.
  3. There is no classic taskbar on Android devices, only Recents screen. Also there is no system tray, it was replaced by notification bar and notification drawer in Android.
  4. There is no API for controlling window size and position in freeform mode.
  5. It is not possible to control window decorations in freeform mode.
  6. It is not possible to control or even get properties like size and position of other windows.
  7. It is not possible to change window caption and icon in freeform mode and in Recents screen.

And so on.

Not going to be implemented.

TomJo2000 commented 2 weeks ago

Yep window management is an issue for a window manager to handle (as the name would suggest). Its out of scope for Termux:X11 itself to handle that when we package a dozen different window managers whose whole deal is managing X windows.

IntinteDAO commented 2 weeks ago

Have you tried any window manager or desktop environment in termux-x11? More info at https://wiki.termux.com/wiki/Graphical_Environment

Yep, but you are "isolated" from Android Desktop. In Multiwindow mode you can work on Linux apps and Android in the same time (in theory).

Android Window system integration is not possible due to a lot of differences between Android and regular Linux distro windowing systems and restrictions of Android windowing system itself. Examples:

1. There is no API to switch between fullscreen and freeform mode.

2. There is no API to create windows. The only thing you can create is a Task which will be represented in Recents screen or on taskbar in the case of desktop mode or Samsung Dex.

3. There is no classic taskbar on Android devices, only Recents screen. Also there is no system tray, it was replaced by notification bar and notification drawer in Android.

4. There is no API for controlling window size and position in freeform mode.

5. It is not possible to control window decorations in freeform mode.

6. It is not possible to control or even get properties like size and position of other windows.

7. It is not possible to change window caption and icon in freeform mode and in Recents screen.

And so on.

Not going to be implemented.

Sure, I assumed the introduction of this mode precisely for solutions like DeX or Ready Now. That is, "somehow" the user launches two applications and each application is a separate application. I don't know if Android allows you to run the same app twice, if not it probably wouldn't work. If so, X Server would have to multiply its process and display in one window, one application.

twaik commented 2 weeks ago

Again, there is no API for this.

IntinteDAO commented 1 week ago

@twaik Hmm, is it possible to run multiple Termux X11 Windows on Android (via cli probably) and set a custom DISPLAY for every ... client?

twaik commented 1 week ago

It is not...