add Jtk_SetWindowTitle()
This commit is contained in:
parent
2d944e4a87
commit
314c840105
@ -83,6 +83,7 @@ bool Window::create(std::shared_ptr<Buffer> buffer)
|
||||
std::cerr << "Error creating window" << std::endl;
|
||||
return false;
|
||||
}
|
||||
Jtk_SetWindowTitle(m_window, "jes");
|
||||
|
||||
#if 0
|
||||
set_window_icon();
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <GL/glx.h>
|
||||
#include "Jtk_internal.h"
|
||||
#include <stdio.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
static Bool WaitForNotify(Display * display, XEvent * event, XPointer arg)
|
||||
{
|
||||
@ -41,4 +42,14 @@ void Jtk_CloseWindow(void * window)
|
||||
XDestroyWindow(g_display, (Window)window);
|
||||
}
|
||||
|
||||
void Jtk_SetWindowTitle(void * window, const char * title)
|
||||
{
|
||||
XTextProperty title_property;
|
||||
if (XStringListToTextProperty((char **)&title, 1, &title_property) != 0)
|
||||
{
|
||||
XSetTextProperty(g_display, (Window)window, &title_property, XA_WM_NAME);
|
||||
XFree(title_property.value);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -4,5 +4,6 @@
|
||||
void * Jtk_CreateWindow();
|
||||
void Jtk_SwapBuffers(void * window);
|
||||
void Jtk_CloseWindow(void * window);
|
||||
void Jtk_SetWindowTitle(void * window, const char * title);
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user