mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
wayland_server: bump version
This commit is contained in:
@@ -1,82 +0,0 @@
|
||||
From dc02b3be2f767dbb5affdc3af5a5a2051a9a71df Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Tue, 23 Sep 2025 21:10:01 +1000
|
||||
Subject: Get application signature from resources
|
||||
|
||||
|
||||
diff --git a/WaylandServer.cpp b/WaylandServer.cpp
|
||||
index b7151a0..e911913 100644
|
||||
--- a/WaylandServer.cpp
|
||||
+++ b/WaylandServer.cpp
|
||||
@@ -21,7 +21,12 @@
|
||||
#include <new>
|
||||
|
||||
#include <Application.h>
|
||||
+#include <String.h>
|
||||
+#include <File.h>
|
||||
#include <OS.h>
|
||||
+#include <AppFileInfo.h>
|
||||
+#include <kernel/image.h>
|
||||
+
|
||||
#include "AppKitPtrs.h"
|
||||
|
||||
|
||||
@@ -67,7 +72,7 @@ private:
|
||||
struct wl_client *fClient{};
|
||||
|
||||
public:
|
||||
- Application();
|
||||
+ Application(const char *signature);
|
||||
virtual ~Application() = default;
|
||||
|
||||
void AddClient(struct wl_client *client);
|
||||
@@ -76,7 +81,7 @@ public:
|
||||
void MessageReceived(BMessage *msg) override;
|
||||
};
|
||||
|
||||
-Application::Application(): BApplication("application/x-vnd.Wayland-App")
|
||||
+Application::Application(const char *signature): BApplication(signature)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -111,6 +116,28 @@ _EXPORT uint32 wl_ips_version = 2;
|
||||
|
||||
extern "C" _EXPORT int wl_ips_client_connected(void **clientOut, void *clientDisplay, client_enqueue_proc display_enqueue)
|
||||
{
|
||||
+ if (be_app == NULL) {
|
||||
+ BString signature = "application/x-vnd.Wayland-App";
|
||||
+ int32 cookie = 0;
|
||||
+ image_info info;
|
||||
+ while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
|
||||
+ if (info.type != B_APP_IMAGE)
|
||||
+ continue;
|
||||
+ BFile appFile(info.name, B_READ_ONLY);
|
||||
+ if (appFile.InitCheck() == B_OK) {
|
||||
+ BAppFileInfo info(&appFile);
|
||||
+ if (info.InitCheck() == B_OK) {
|
||||
+ char file_signature[B_MIME_TYPE_LENGTH];
|
||||
+ if (info.GetSignature(file_signature) == B_OK)
|
||||
+ signature.SetTo(file_signature);
|
||||
+ }
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ new Application(signature.String());
|
||||
+ be_app->Run();
|
||||
+ }
|
||||
+
|
||||
if (gServerHandler.Looper() == NULL) {
|
||||
gWaylandLooper = new BLooper("wayland", B_DISPLAY_PRIORITY);
|
||||
gWaylandLooper->AddHandler(&gServerHandler);
|
||||
@@ -118,9 +145,6 @@ extern "C" _EXPORT int wl_ips_client_connected(void **clientOut, void *clientDis
|
||||
gWaylandLooper->Run();
|
||||
}
|
||||
|
||||
- new Application();
|
||||
- be_app->Run();
|
||||
-
|
||||
fprintf(stderr, "wl_ips_client_connected\n");
|
||||
if (sDisplay == NULL) {
|
||||
sDisplay = wl_display_create();
|
||||
--
|
||||
2.50.1
|
||||
@@ -8,10 +8,9 @@ COPYRIGHT="2022-2025 X512"
|
||||
LICENSE="GNU LGPL v2.1
|
||||
MIT"
|
||||
REVISION="1"
|
||||
srcGitRev="15c3d4bb14f0f69add877b1dee4bcf24b7b95f38"
|
||||
srcGitRev="83f543a7de73e57a4efc40c227c2f3f0bda9ae60"
|
||||
SOURCE_URI="https://github.com/X547/wayland-server/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="b04db44be7981e1873fbd23e02db30c8188abee895e3b950aa3d0b2ddef537f6"
|
||||
PATCHES="wayland_server-$portVersion.patchset"
|
||||
CHECKSUM_SHA256="815247e8737c10f0707759383477010ba520be20996a78fa249d6970996f3942"
|
||||
SOURCE_DIR="wayland-server-$srcGitRev"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
Reference in New Issue
Block a user