Code Monkey home page Code Monkey logo

Comments (25)

santigimeno avatar santigimeno commented on August 11, 2024

Hey, can you post sample code that reproduces the issue?

from node-ewmh.

RossComputerGuy avatar RossComputerGuy commented on August 11, 2024

NTK is used.

		ntk.createClient((err,app) => {
			if(err) throw err;
			this[SYMS["app"]] = app;
			this[SYMS["win"]] = app.createWindow({ width: this.width, height: this.height, x: this.x, y: this.y, title: "RDE Panel" });
			this[SYMS["win"]].map();
			this[SYMS["ewmh"]] = new EWMH(app.X,app.display.screen[this[SYMS["opts"]].screen].root);
			this[SYMS["ewmh"]].set_class(this[SYMS["win"]].id,["panel"],err => {
				if(err) throw err;
			});
		});

from node-ewmh.

santigimeno avatar santigimeno commented on August 11, 2024

Is another WM already running in the same xserver?

from node-ewmh.

RossComputerGuy avatar RossComputerGuy commented on August 11, 2024

Yes, I'm running OpenBox

from node-ewmh.

santigimeno avatar santigimeno commented on August 11, 2024

That seems to be the problem. I don't know exactly what are you trying to accomplish but only one X11 client can set SubstructureRedirect mask in a specific window, and I guess openbox has set the mask in the root window. /cc @sidorares

from node-ewmh.

RossComputerGuy avatar RossComputerGuy commented on August 11, 2024

I'm trying to make a panel/dock.

from node-ewmh.

sidorares avatar sidorares commented on August 11, 2024

yes, only one client can own SubstructureRedirect. If somebody already started WM you'll need to make it quit before you start new one. There is a "polite way to do that" ( this is what some wm's offer under --replace command line key ). To do that, you try to request selection for WM_S0 ( 0 screen number ) and other wm should notice it's lost selection and quit

https://github.com/bbidulock/icewm/blob/77196178450accf0a959155c94ec8c1c401633a8/src/wmapp.cc#L98-L105

from node-ewmh.

RossComputerGuy avatar RossComputerGuy commented on August 11, 2024

The replace key didn't fix it.

from node-ewmh.

sidorares avatar sidorares commented on August 11, 2024

There is no "replace" key built in to node-x11 or node-ewmh library

You need to kill your WM or follow standard "hey other WM please let me replace you" protocol, that is you need to create a window and acquire WM_S0 selection to that window.

from node-ewmh.

RossComputerGuy avatar RossComputerGuy commented on August 11, 2024

The replace key in my window manager, that's what I was meaning.

from node-ewmh.

sidorares avatar sidorares commented on August 11, 2024

But you are launching your script after some other WM already started, right? So it's your script responsibility to try to replace wm, not that other WM

from node-ewmh.

RossComputerGuy avatar RossComputerGuy commented on August 11, 2024

Yeah, after OpenBox has started because my DE is RDE. Killing my WM stops the DE which stops X.

from node-ewmh.

sidorares avatar sidorares commented on August 11, 2024

You can't have both OpenBox running and request SubstructureRedirect for root window

from node-ewmh.

RossComputerGuy avatar RossComputerGuy commented on August 11, 2024

Is there a way to bypass the SubstructureRedirect request?

from node-ewmh.

sidorares avatar sidorares commented on August 11, 2024

Is there a way to bypass the SubstructureRedirect request?

Not sure what do you mean by bypassing. SubstructureRedirect is what gives WM full control over child windows position/mapping etc. Without doing that you can't do real wm.

On the other hand if what you doing is not full wm (panel or something similer) you don't need SubstructureRedirect

from node-ewmh.

RossComputerGuy avatar RossComputerGuy commented on August 11, 2024

I was meaning like an option to disable SubstructureRedirect because I'm using this in RDE's toolkit and panel.

from node-ewmh.

sidorares avatar sidorares commented on August 11, 2024

Still not clear to me. Which code tries to get SubstructureRedirect ?

from node-ewmh.

RossComputerGuy avatar RossComputerGuy commented on August 11, 2024

None or new EWMH(app.X,app.display.screen[this[SYMS["opts"]].screen].root)

from node-ewmh.

sidorares avatar sidorares commented on August 11, 2024

can you show panel source code?

from node-ewmh.

santigimeno avatar santigimeno commented on August 11, 2024

Okay, I think I now remember. It's been a long time without using this module. node-ewmh as it is now, it's meant to help implementing the Extended Window Manager Hints to a window manager implementation. So one of the first things it does is trying to set the SubstructureRedirect in the root window. So yes, to use this module you have to avoid any other x11 client to have that mask value set.

from node-ewmh.

RossComputerGuy avatar RossComputerGuy commented on August 11, 2024

https://github.com/Ross-Technologies/RDE-Panel

from node-ewmh.

santigimeno avatar santigimeno commented on August 11, 2024

Why do you need node-ewmh? If it's only to set the WM_CLASS property in a window, then use https://github.com/santigimeno/node-x11-prop#set-property and avoid all the problems.

from node-ewmh.

RossComputerGuy avatar RossComputerGuy commented on August 11, 2024

Well, that's how far I got when I started getting the error, I dunno what else I should have node-ewmh do.

from node-ewmh.

santigimeno avatar santigimeno commented on August 11, 2024

I would say if you're not implementing a window manager which you're not, I would not use node-ewmh.

from node-ewmh.

santigimeno avatar santigimeno commented on August 11, 2024

Or you can always modify it so it suits your use case.

from node-ewmh.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.