Fix for Windows.
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 1m52s

This commit is contained in:
2025-01-15 22:58:20 -05:00
parent e764dcf5b8
commit 830dd954a2
4 changed files with 7 additions and 31 deletions

View File

@@ -10,7 +10,6 @@
#include <rewindow/types/gamepadbutton.h>
#include <J3ML/LinearAlgebra.hpp>
#include <rewindow/types/WindowEvents.hpp>
#include <format>
#include <queue>

View File

@@ -1,11 +1,9 @@
#include <iostream>
#include <rewindow/types/window.h>
#include <rewindow/types/display.h>
#include <rewindow/logger/logger.h>
#include <stdio.h>
#include <X11/Xlib.h>
//aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Windows :/
@@ -110,31 +108,6 @@ int main() {
}
*/
Display *dpy;
Window owner;
Atom sel;
char *selections[] = { "PRIMARY", "SECONDARY", "CLIPBOARD", "FOOBAR" };
size_t i;
dpy = XOpenDisplay(NULL);
if (!dpy)
{
fprintf(stderr, "Could not open X display\n");
return 1;
}
for (i = 0; i < sizeof selections / sizeof selections[0]; i++)
{
sel = XInternAtom(dpy, selections[i], False);
owner = XGetSelectionOwner(dpy, sel);
printf("Owner of '%s': 0x%lX\n", selections[i], owner);
}
auto* window = new MyWindow("Test Window", 600, 480);
jlog::Debug(std::format("New window '{}' created. width={} height={}", window->GetTitle(), window->GetWidth(),
window->GetHeight()));

View File

@@ -24,7 +24,8 @@ void RWindow::SetFlag(RWindowFlags flag, bool state) {
SetWindowLong(hwnd, GWL_STYLE, style);
SetWindowPos(hwnd, nullptr, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOOWNERZORDER);
}
}wasd
}
void RWindow::SetResizable(bool resizable) {
SetFlag(RWindowFlags::RESIZABLE, resizable);;
}
@@ -300,3 +301,7 @@ void RWindow::GLSwapBuffers() {
std::string RWindow::getGraphicsDriverVendor() {
return std::string(reinterpret_cast<const char*>(glGetString(GL_VENDOR)));
}
void RWindow::DestroyOSWindowHandle() {
DestroyWindow(hwnd);
}

View File

@@ -1,7 +1,6 @@
#include <rewindow/types/mousebutton.h>
#include <string>
#include <X11/X.h>
#include "rewindow/logger/logger.h"
#include <rewindow/logger/logger.h>
MouseButton::MouseButton(const std::string& charcode, unsigned int index) {