Skip to content

Commit

Permalink
support setting exclusive zone
Browse files Browse the repository at this point in the history
  • Loading branch information
xdavidwu committed Jul 22, 2023
1 parent c5d074e commit 1373c8e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion qt-video-wlr-bg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ int main(int argc,char *argv[]){
"Widget bottom margin. Defaults to 0.", "margin", "0");
QCommandLineOption leftMarginOption("left-margin",
"Widget left margin. Defaults to 0.", "margin", "0");
QCommandLineOption exclusiveZoneOption({"x", "exclusive-zone"},
"Exclusive zone distance, -1 to draw over panels. Defaults to 0.", "distance", "0");
parser.addOptions({ layerOption, widthOption, heightOption, colorOption,
volumeOption, positionOption, noLoopOption, marginOption,
topMarginOption, rightMarginOption, bottomMarginOption,
leftMarginOption });
leftMarginOption, exclusiveZoneOption });
parser.process(app);

bool ok;
Expand Down Expand Up @@ -134,6 +136,10 @@ int main(int argc,char *argv[]){
if (!ok) parser.showHelp(1);
layerShell->setMargins({left_margin, top_margin, right_margin, bottom_margin});

int32_t exclusive_zone = parser.value(exclusiveZoneOption).toInt(&ok);
if (!ok || exclusive_zone < -1) parser.showHelp(1);
layerShell->setExclusiveZone(exclusive_zone);

layerShell->setKeyboardInteractivity(LayerShellQt::Window::KeyboardInteractivityNone);

layerShell->setDesiredOutput(nullptr);
Expand Down

0 comments on commit 1373c8e

Please sign in to comment.