mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Add x-wm-class and x-wm-class-name configuration variables (closes LP bug 1075555)
This commit is contained in:
parent
3ece78a638
commit
b04f8a5db8
@ -1,5 +1,5 @@
|
|||||||
// Filename: config_x11display.cxx
|
// Filename: config_x11display.cxx
|
||||||
// Created by: pro-rsoft (07Jul09)
|
// Created by: rdb (07Jul09)
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@ -61,6 +61,16 @@ ConfigVariableInt x_wheel_right_button
|
|||||||
"mouse button number does the system report when one scrolls "
|
"mouse button number does the system report when one scrolls "
|
||||||
"to the right?"));
|
"to the right?"));
|
||||||
|
|
||||||
|
ConfigVariableString x_wm_class_name
|
||||||
|
("x-wm-class-name", "",
|
||||||
|
PRC_DESC("Specify the value to use for the res_name field of the window's "
|
||||||
|
"WM_CLASS property. Has no effect when x-wm-class is not set."));
|
||||||
|
|
||||||
|
ConfigVariableString x_wm_class
|
||||||
|
("x-wm-class", "",
|
||||||
|
PRC_DESC("Specify the value to use for the res_class field of the window's "
|
||||||
|
"WM_CLASS property."));
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: init_libx11display
|
// Function: init_libx11display
|
||||||
// Description: Initializes the library. This must be called at
|
// Description: Initializes the library. This must be called at
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Filename: config_x11display.h
|
// Filename: config_x11display.h
|
||||||
// Created by: pro-rsoft (07Jul09)
|
// Created by: rdb (07Jul09)
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@ -33,4 +33,7 @@ extern ConfigVariableInt x_wheel_down_button;
|
|||||||
extern ConfigVariableInt x_wheel_left_button;
|
extern ConfigVariableInt x_wheel_left_button;
|
||||||
extern ConfigVariableInt x_wheel_right_button;
|
extern ConfigVariableInt x_wheel_right_button;
|
||||||
|
|
||||||
|
extern ConfigVariableString x_wm_class_name;
|
||||||
|
extern ConfigVariableString x_wm_class;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1077,13 +1077,21 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) {
|
|||||||
// Class to "Undecorated", and let the user configure his/her window
|
// Class to "Undecorated", and let the user configure his/her window
|
||||||
// manager not to put a border around windows of this class.
|
// manager not to put a border around windows of this class.
|
||||||
XClassHint *class_hints_p = NULL;
|
XClassHint *class_hints_p = NULL;
|
||||||
if (properties.get_undecorated() || properties.get_fullscreen()) {
|
if (!x_wm_class.empty()) {
|
||||||
|
// Unless the user wanted to use his own WM_CLASS, of course.
|
||||||
|
class_hints_p = XAllocClassHint();
|
||||||
|
class_hints_p->res_class = x_wm_class.c_str();
|
||||||
|
if (!x_wm_class_name.empty()) {
|
||||||
|
class_hints_p->res_name = x_wm_class_name.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (properties.get_undecorated() || properties.get_fullscreen()) {
|
||||||
class_hints_p = XAllocClassHint();
|
class_hints_p = XAllocClassHint();
|
||||||
class_hints_p->res_class = (char*) "Undecorated";
|
class_hints_p->res_class = (char*) "Undecorated";
|
||||||
|
}
|
||||||
|
|
||||||
if (!properties.get_fullscreen()) {
|
if (properties.get_undecorated() && !properties.get_fullscreen()) {
|
||||||
type_data[next_type_data++] = _net_wm_window_type_splash;
|
type_data[next_type_data++] = _net_wm_window_type_splash;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties.has_z_order()) {
|
if (properties.has_z_order()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user