Giter Club home page Giter Club logo

wsm's People

Contributors

lychee-yycy avatar zzxyb avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wsm's Issues

add input and output config

  • add input config. pointer、touch、keyboard.。
  • add output config and store, support muti-output auto config and client config
  • improve output related functions, such as gamma, backlight, settings

add server side decoration(ssd)

  • Supports decorator titlebar, with application icon on the left, text in the middle, and minimize, maximize, and close buttons on the right
  • Minimize, maximize, and close buttons can be hidden according to the application window flag settings.ref Qt setWindowFlags: Qt::WindowMinimizeButtonHint Qt::WindowMaximizeButtonHint Qt::WindowCloseButtonHint
  • Support application selection of csd (client slide decoration)or ssd

Moving window concurrency issues

The following two issues need to be fixed:

  • Press the left button on the title bar and the cursor will change immediately,need to be modified: cursor image changes only when the left mouse button is pressed for a certain period of time.
  • for Wayland windows, when you press the left mouse button in a blank area, the window move function will be triggered .not a problem, because xdg_toplevel requests move!

initialize the framework

  • init project bac8c8a ,generally includes the following functions:
  • text_node,show text display node on scene
  • image_node,show image display node on scene
  • xdg surface display support
  • input、seat、cursor and some protocol implementations
  • github action configuration, support arch linux and debian compilation
  • Debian packaging configuration
  • Note that there are still many missing features
  • add support xwayland
  • custom graphics node rendering

add Animation

Supports multiple animation curves、custom post-processing on the animation line,wlr_scene_node or display nodes based on it.

  • add Fade Animation
  • add animation group
  • add width、height animation line function
  • add opacity animation line function
  • add color animation line function

add TileWindows

  • Supports automatic arrangement of multiple windows (2, 3, 4), so ​​that they can be displayed side by side on the screen without overlapping
  • Support dragging the title bar to shuffle or insert the arrangement

Support workspace management

  • Supports adding and deleting workspaces, and exposes protocols so that clients can control them
  • Supports switching workspaces by swiping left and right with three fingers

Increase the edge sensing area

  • The current mouse interaction on the window edge to trigger resize is not sensitive enough, making it difficult for users to operate.
  • Increase the edge sensing area to 8-10px

remove notify dbus

Use LINUX Signals instead of dbus to notify another process that wsm is ready,maybe SIGUSR1
the return is as follows:

  • wsm does not want to introduce dbus
  • decoupling from the desktop environment
  • The client can also poll the wayland socket to detect if the Wayland compositor has started.

poll demo:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <poll.h>
#include <errno.h>
#include <string.h>

#define SOCKET_PATH "/run/user/1000/wayland-0"
#define TIMEOUT 5000  // 超时时间,单位为毫秒

int main() {
    int sockfd;
    struct sockaddr_un addr;
    struct pollfd pfd;
    int ret;

    // 创建 Unix 域套接字
    sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
    if (sockfd == -1) {
        perror("socket");
        exit(EXIT_FAILURE);
    }

    // 配置套接字地址
    memset(&addr, 0, sizeof(struct sockaddr_un));
    addr.sun_family = AF_UNIX;
    strncpy(addr.sun_path, SOCKET_PATH, sizeof(addr.sun_path) - 1);

    // 非阻塞模式
    int flags = fcntl(sockfd, F_GETFL, 0);
    fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);

    // 尝试连接 Wayland 套接字
    ret = connect(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_un));
    if (ret == -1 && errno != EINPROGRESS) {
        perror("connect");
        close(sockfd);
        exit(EXIT_FAILURE);
    }

    // 设置 poll 结构体
    pfd.fd = sockfd;
    pfd.events = POLLOUT;

    // 轮询 Wayland 套接字
    ret = poll(&pfd, 1, TIMEOUT);
    if (ret == -1) {
        perror("poll");
        close(sockfd);
        exit(EXIT_FAILURE);
    } else if (ret == 0) {
        printf("Timeout occurred! Wayland socket is not ready.\n");
        close(sockfd);
        exit(EXIT_FAILURE);
    } else {
        if (pfd.revents & POLLOUT) {
            printf("Wayland socket is ready for connection.\n");
        } else {
            printf("Wayland socket is not ready, unexpected event: %d\n", pfd.revents);
        }
    }

    // 关闭套接字
    close(sockfd);
    return 0;
}

cursor displays abnormal

when you press the left mouse button on the window title bar, the cursor image may occasionally appear abnormal
cursor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.