xwayland: move to hyprland impl (#6086)
This commit is contained in:
parent
a71207434c
commit
addd3e7f1a
36 changed files with 2956 additions and 707 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include "Compositor.hpp"
|
||||
#include "../config/ConfigValue.hpp"
|
||||
#include "PointerManager.hpp"
|
||||
#include "../xwayland/XWayland.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <wlr/interfaces/wlr_buffer.h>
|
||||
|
|
@ -246,14 +247,14 @@ SCursorImageData CCursorManager::dataFor(const std::string& name) {
|
|||
return IMAGES.images[0];
|
||||
}
|
||||
|
||||
void CCursorManager::setXWaylandCursor(wlr_xwayland* xwayland) {
|
||||
void CCursorManager::setXWaylandCursor() {
|
||||
const auto CURSOR = dataFor("left_ptr");
|
||||
if (CURSOR.surface) {
|
||||
wlr_xwayland_set_cursor(xwayland, cairo_image_surface_get_data(CURSOR.surface), cairo_image_surface_get_stride(CURSOR.surface), CURSOR.size, CURSOR.size, CURSOR.hotspotX,
|
||||
CURSOR.hotspotY);
|
||||
g_pXWayland->setCursor(cairo_image_surface_get_data(CURSOR.surface), cairo_image_surface_get_stride(CURSOR.surface), {CURSOR.size, CURSOR.size},
|
||||
{CURSOR.hotspotX, CURSOR.hotspotY});
|
||||
} else if (const auto XCURSOR = wlr_xcursor_manager_get_xcursor(m_pWLRXCursorMgr, "left_ptr", 1); XCURSOR) {
|
||||
wlr_xwayland_set_cursor(xwayland, XCURSOR->images[0]->buffer, XCURSOR->images[0]->width * 4, XCURSOR->images[0]->width, XCURSOR->images[0]->height,
|
||||
XCURSOR->images[0]->hotspot_x, XCURSOR->images[0]->hotspot_y);
|
||||
g_pXWayland->setCursor(XCURSOR->images[0]->buffer, XCURSOR->images[0]->width * 4, {XCURSOR->images[0]->width, XCURSOR->images[0]->height},
|
||||
{XCURSOR->images[0]->hotspot_x, XCURSOR->images[0]->hotspot_y});
|
||||
} else
|
||||
Debug::log(ERR, "CursorManager: no valid cursor for xwayland");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue