add more SLSTransaction SkyLight signatures

This commit is contained in:
Felix Kratz 2022-12-19 22:34:52 +01:00
parent 89af3cca83
commit f1c5cd9f48
2 changed files with 15 additions and 10 deletions

View file

@ -119,8 +119,6 @@ bool window_apply_frame(struct window* window) {
} }
SLSSetWindowShape(g_connection, window->id, 0, 0, frame_region); SLSSetWindowShape(g_connection, window->id, 0, 0, frame_region);
CFRelease(frame_region);
window_move(window, window->origin);
if (window->parent) { if (window->parent) {
CGContextClearRect(window->context, window->frame); CGContextClearRect(window->context, window->frame);
@ -131,6 +129,9 @@ bool window_apply_frame(struct window* window) {
} }
} }
CFRelease(frame_region);
window_move(window, window->origin);
window->needs_move = false; window->needs_move = false;
window->needs_resize = false; window->needs_resize = false;
return true; return true;

View file

@ -1,12 +1,16 @@
#pragma once #pragma once
#include "misc/helpers.h" #include "misc/helpers.h"
// CFTypeRef SLSTransactionCreate(int cid); CFTypeRef SLSTransactionCreate(int cid);
// extern CGError SLSTransactionSetWindowShape(CFTypeRef transaction, uint32_t wid, float x_offset, float y_offset, CFTypeRef region); extern CGError SLSTransactionSetWindowShape(CFTypeRef transaction, uint32_t wid, float x_offset, float y_offset, CFTypeRef region);
// extern CGError SLSTransactionOrderWindow(CFTypeRef transaction, uint32_t wid, int mode, uint32_t relativeToWID); extern CGError SLSTransactionOrderWindow(CFTypeRef transaction, uint32_t wid, int mode, uint32_t relativeToWID);
// extern CGError SLSTransactionSetWindowLevel(CFTypeRef transaction, uint32_t wid, int level); extern CGError SLSTransactionSetWindowLevel(CFTypeRef transaction, uint32_t wid, int level);
// extern CGError SLSTransactionCommitUsingMethod(CFTypeRef transaction, uint32_t method); extern CGError SLSTransactionSetWindowShape(CFTypeRef transaction, uint32_t wid, float x_offset, float y_offset, CFTypeRef shape);
// extern CGError SLSTransactionCommit(CFTypeRef transaction, uint32_t async); extern CGError SLSTransactionMoveWindowWithGroup(CFTypeRef transaction, uint32_t wid, CGPoint* point);
extern CGError SLSTransactionAddWindowToWindowOrderingGroup(CFTypeRef transaction, uint32_t parent_wid, uint32_t child_wid, int order);
extern CGError SLSTransactionClearWindowOrderingGroup(CFTypeRef transaction, uint32_t wid);
extern CGError SLSTransactionCommitUsingMethod(CFTypeRef transaction, uint32_t method);
extern CGError SLSTransactionCommit(CFTypeRef transaction, uint32_t async);
extern CGError SLSDisableUpdate(int cid); extern CGError SLSDisableUpdate(int cid);
extern CGError SLSReenableUpdate(int cid); extern CGError SLSReenableUpdate(int cid);
@ -28,12 +32,12 @@ extern CGError SLSAddActivationRegion(uint32_t cid, uint32_t wid, CFTypeRef regi
extern CGError SLSAddTrackingRect(uint32_t cid, uint32_t wid, CGRect rect); extern CGError SLSAddTrackingRect(uint32_t cid, uint32_t wid, CGRect rect);
extern CGError SLSClearActivationRegion(uint32_t cid, uint32_t wid); extern CGError SLSClearActivationRegion(uint32_t cid, uint32_t wid);
extern CGError SLSRemoveAllTrackingAreas(uint32_t cid, uint32_t wid); extern CGError SLSRemoveAllTrackingAreas(uint32_t cid, uint32_t wid);
extern CGError SLSMoveWindow(int cid, uint32_t wid, CGPoint *point); extern CGError SLSMoveWindow(int cid, uint32_t wid, CGPoint* point);
extern CGError SLSWindowSetShadowProperties(uint32_t wid, CFDictionaryRef properties); extern CGError SLSWindowSetShadowProperties(uint32_t wid, CFDictionaryRef properties);
extern CGError SLSAddWindowToWindowOrderingGroup(int cid, uint32_t parent_wid, uint32_t child_wid, int order); extern CGError SLSAddWindowToWindowOrderingGroup(int cid, uint32_t parent_wid, uint32_t child_wid, int order);
extern CGError SLSRemoveFromOrderingGroup(int cid, uint32_t wid); extern CGError SLSRemoveFromOrderingGroup(int cid, uint32_t wid);
extern CGError SLSReassociateWindowsSpacesByGeometry(int cid, CFArrayRef wids); extern CGError SLSReassociateWindowsSpacesByGeometry(int cid, CFArrayRef wids);
extern void SLSMoveWindowsToManagedSpace(int cid, CFArrayRef window_list, uint64_t sid); extern CGError SLSMoveWindowsToManagedSpace(int cid, CFArrayRef window_list, uint64_t sid);
extern void SLSCaptureWindowsContentsToRectWithOptions(uint32_t cid, uint64_t* wid, bool meh, CGRect bounds, uint32_t flags, CGImageRef* image); extern void SLSCaptureWindowsContentsToRectWithOptions(uint32_t cid, uint64_t* wid, bool meh, CGRect bounds, uint32_t flags, CGImageRef* image);
extern int SLSGetScreenRectForWindow(uint32_t cid, uint32_t wid, CGRect* out); extern int SLSGetScreenRectForWindow(uint32_t cid, uint32_t wid, CGRect* out);