VincentWei / MiniGUI

A modern and mature cross-platform window system for embedded systems and smart IoT devices.
http://www.minigui.com
GNU General Public License v3.0
695 stars 157 forks source link

MiniGUI是否可以实现多个进程跑在同一个桌面上? #71

Closed yibo-huang closed 3 years ago

yibo-huang commented 3 years ago

目前我的理解是,每个 minigui app 都得链接 minigui lib ,也就是每个 app 都是单独具有一个背景桌面, 并没有办法让两个 app 显示在同一个桌面上,要实现这个肯定需要一个类似 gui server 的支持(如 xserver ), 但 minigui 仅仅只是一个库, 无法实现管理多个进程窗口的效果,不知道我的理解是否准确?

VincentWei commented 3 years ago

It's not correct. miniGUI provides three runtime mode, under miniGUI-Procesdses mode, the mginit process acts as x-server.

yibo-huang commented 3 years ago

Let's say that there are two MiniGUI apps called A and B. They both link libminigui.so. Is it possible for them to appear as two windows on a same background?

VincentWei commented 3 years ago

Yes. Under MiniGUI-Processes runtime mode, MiniGUI can act as a full-featured window system for desktop.

BTW, precisely, the client processes both link to libminigui_procs.so.

yibo-huang commented 3 years ago

Okay I see, but I have a question. How does the MiniGUI app know that there is a server already running?(for example app B mentioned above) Since a lib's data can't be shared across different apps. So I guess it requires some os support ?

VincentWei commented 3 years ago

It is quite complex. IPCs, such as shared memory and semaphore, are required.

I recommend that you read some source code in MiniGUI, especially in the following directories: