mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 06:42:26 +00:00
X11 targets have runtime caption setting now.
This commit is contained in:
parent
85ddc29ac6
commit
85e0b2b6aa
4 changed files with 31 additions and 15 deletions
|
@ -47,16 +47,17 @@ extern qboolean doShm;
|
|||
extern int x_shmeventtype;
|
||||
extern qboolean oktodraw;
|
||||
|
||||
qboolean x11_add_event( int event, void (*event_handler)(XEvent *));
|
||||
qboolean x11_del_event( int event, void (*event_handler)(XEvent *));
|
||||
void x11_process_event( void );
|
||||
void x11_process_events( void );
|
||||
void x11_open_display( void );
|
||||
void x11_close_display( void );
|
||||
void x11_create_null_cursor(void);
|
||||
void x11_set_vidmode(int width, int height);
|
||||
void x11_restore_vidmode(void);
|
||||
void x11_create_window(int width, int height);
|
||||
void x11_grab_keyboard(void);
|
||||
qboolean x11_add_event (int event, void (*event_handler)(XEvent *));
|
||||
qboolean x11_del_event (int event, void (*event_handler)(XEvent *));
|
||||
void x11_process_event (void);
|
||||
void x11_process_events (void);
|
||||
void x11_open_display (void);
|
||||
void x11_close_display (void);
|
||||
void x11_create_null_cursor (void);
|
||||
void x11_set_vidmode (int, int);
|
||||
void x11_restore_vidmode (void);
|
||||
void x11_create_window (int, int);
|
||||
void x11_grab_keyboard (void);
|
||||
void x11_set_caption (char *);
|
||||
|
||||
#endif // __CONTEXT_X11_H__
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
# include <X11/extensions/xf86vmode.h>
|
||||
#endif
|
||||
|
||||
#include "commdef.h"
|
||||
#include "context_x11.h"
|
||||
#include "dga_check.h"
|
||||
#include "qtypes.h"
|
||||
|
@ -319,8 +320,11 @@ x11_create_window(int width, int height)
|
|||
x_win = XCreateWindow(x_disp, x_root, 0, 0, width, height,
|
||||
0, x_visinfo->depth, InputOutput,
|
||||
x_vis, mask, &attr);
|
||||
/* Give it a title */
|
||||
XStoreName(x_disp, x_win, "XQuake");
|
||||
|
||||
// Set window title
|
||||
XStoreName (x_disp, x_win, va ("%s %s", PROGRAM, VERSION));
|
||||
// Set icon name
|
||||
XSetIconName (x_disp, x_win, PROGRAM);
|
||||
|
||||
/* Make window respond to Delete events */
|
||||
aWMDelete = XInternAtom(x_disp, "WM_DELETE_WINDOW", False);
|
||||
|
@ -355,3 +359,10 @@ x11_grab_keyboard(void)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
x11_set_caption (char *text)
|
||||
{
|
||||
if (x_disp && x_win && text)
|
||||
XStoreName (x_disp, x_win, text);
|
||||
}
|
||||
|
|
|
@ -606,6 +606,8 @@ VID_UnlockBuffer ( void )
|
|||
{
|
||||
}
|
||||
|
||||
void VID_SetCaption (char *text)
|
||||
void
|
||||
VID_SetCaption (char *text)
|
||||
{
|
||||
x11_set_caption (text);
|
||||
}
|
||||
|
|
|
@ -803,6 +803,8 @@ VID_UnlockBuffer ( void )
|
|||
{
|
||||
}
|
||||
|
||||
void VID_SetCaption (char *text)
|
||||
void
|
||||
VID_SetCaption (char *text)
|
||||
{
|
||||
x11_set_caption (text);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue