new x11 option for disabling the forced click-to-focus so that the fuzzer can work:
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
bb51bc3c5f
commit
3779b2e0db
3 changed files with 18 additions and 8 deletions
17
configure
vendored
17
configure
vendored
|
|
@ -47,6 +47,8 @@ param_set("static", 1);
|
||||||
param_set("examples", 1);
|
param_set("examples", 1);
|
||||||
param_set("dbus", 1);
|
param_set("dbus", 1);
|
||||||
|
|
||||||
|
# (option that only makes sense on x11)
|
||||||
|
param_set("allow-sloppy-focus", 0);
|
||||||
|
|
||||||
my %features = (
|
my %features = (
|
||||||
"classic-theme" => "use classic theme",
|
"classic-theme" => "use classic theme",
|
||||||
|
|
@ -61,7 +63,8 @@ my %features = (
|
||||||
"static" => "build static library",
|
"static" => "build static library",
|
||||||
"wayland" => "enable wayland backend",
|
"wayland" => "enable wayland backend",
|
||||||
"gnustep" => "use gnustep",
|
"gnustep" => "use gnustep",
|
||||||
"dbus" => "use DBus on supported platform"
|
"dbus" => "use DBus on supported platform",
|
||||||
|
"allow-sloppy-focus" => "prevent the x11 backend from using XSetInputFocus to enforce click-to-focus"
|
||||||
);
|
);
|
||||||
my @features_keys = (
|
my @features_keys = (
|
||||||
"1classic-theme", "1stb-image",
|
"1classic-theme", "1stb-image",
|
||||||
|
|
@ -81,6 +84,12 @@ sub def_platform {
|
||||||
param_set("freetype2", 0);
|
param_set("freetype2", 0);
|
||||||
param_set("stb-truetype", 1);
|
param_set("stb-truetype", 1);
|
||||||
}
|
}
|
||||||
|
if($target eq "Linux") {
|
||||||
|
param_set("x11", 1);
|
||||||
|
if(!param_get("tiny")){
|
||||||
|
param_set("wayland", 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $l (@ARGV) {
|
foreach my $l (@ARGV) {
|
||||||
|
|
@ -91,12 +100,6 @@ foreach my $l (@ARGV) {
|
||||||
|
|
||||||
def_platform();
|
def_platform();
|
||||||
|
|
||||||
if($target eq "Linux") {
|
|
||||||
param_set("x11", 1);
|
|
||||||
if(!param_get("tiny")){
|
|
||||||
param_set("wayland", 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach my $l (@ARGV) {
|
foreach my $l (@ARGV) {
|
||||||
if ($l =~ /^--with-([^=]+)=(.+)$/) {
|
if ($l =~ /^--with-([^=]+)=(.+)$/) {
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,10 @@ else {
|
||||||
if (param_get("stb-truetype")) {
|
if (param_get("stb-truetype")) {
|
||||||
add_cflags("-DUSE_STB_TRUETYPE");
|
add_cflags("-DUSE_STB_TRUETYPE");
|
||||||
}
|
}
|
||||||
|
if (param_get("allow-sloppy-focus")) {
|
||||||
|
add_cflags("-DALLOW_SLOPPY_FOCUS");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
add_incdir("-Iexternal/libz/include");
|
add_incdir("-Iexternal/libz/include");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -708,7 +708,8 @@ static void MwLLNextEventImpl(MwLL handle) {
|
||||||
p.button = MwMOUSE_WHEELDOWN;
|
p.button = MwMOUSE_WHEELDOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
XSetInputFocus(handle->x11.display, handle->x11.window, RevertToNone, CurrentTime);
|
/* this really shouldn't be in this function but it might be needed for enforcing click-to-focus. check later. */
|
||||||
|
/* XSetInputFocus(handle->x11.display, handle->x11.window, RevertToNone, CurrentTime);*/
|
||||||
|
|
||||||
MwLLDispatch(handle, down, &p);
|
MwLLDispatch(handle, down, &p);
|
||||||
} else if(ev.type == ButtonRelease) {
|
} else if(ev.type == ButtonRelease) {
|
||||||
|
|
@ -1200,7 +1201,9 @@ static void MwLLShowImpl(MwLL handle, int show) {
|
||||||
if(show) {
|
if(show) {
|
||||||
wait_map(handle, 1);
|
wait_map(handle, 1);
|
||||||
|
|
||||||
|
#ifndef ALLOW_SLOPPY_FOCUS
|
||||||
XSetInputFocus(handle->x11.display, handle->x11.window, RevertToNone, CurrentTime);
|
XSetInputFocus(handle->x11.display, handle->x11.window, RevertToNone, CurrentTime);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
wait_unmap(handle, 1);
|
wait_unmap(handle, 1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue