You are not logged in.

#1 2008-05-15 20:23:31

SNP
Member
From: Athens / Greece
Registered: 2007-12-05
Posts: 18

Visibility weird behavior after -Syu

Hello smile

I have been using visibility with openbox on my Arch 64 system for a long time and have been very pleased with both. I just did a full system update yesterday and have been experiencing a weird behavior on visibility ever since.

Usually when I clicked on an application on a different desktop than mine I was transported to that desktop and the application was focused.

Since the system update , whenever I click on an application on a different desktop, that application is moved to my current desktop. Meaning that if I actually clicked on every app running on every other desktop, they would all be moved to my current desktop. Weird and impractical if you ask me.

I am suspecting it has something to do with an upgrade on openbox ? I checked whether some new option/setting was installed on the config file but didn't notice anything.

Anyone else experiencing the same effect ?

Offline

#2 2008-05-16 09:12:47

haench
Member
Registered: 2008-05-02
Posts: 9

Re: Visibility weird behavior after -Syu

Hi,

smae thing here! Problem is, that they changed the way openbox handels the (i dont know the right expression) 'call' whenn you click on the icons. i dont really understand that, but maybe you do, wehn you read this:

http://icculus.org/openbox/index.php/Op … 1_released

when i get that right, we have to change visibility to switch the destop before raising the window !?!?


Haench

Offline

#3 2008-05-16 10:10:15

SNP
Member
From: Athens / Greece
Registered: 2007-12-05
Posts: 18

Re: Visibility weird behavior after -Syu

Argh, and as far as I know visibility is not being developed any more neutral

Hopefully they will add an option to switch the _NET_ACTIVE_WINDOW to its old behaviour, although I have my doubts. They did mention that it is the "industry standard" to behave that way :-/

Offline

#4 2008-05-16 11:03:04

haench
Member
Registered: 2008-05-02
Posts: 9

Re: Visibility weird behavior after -Syu

Maybe one can easily change the visibility code to do it right ?

Problem is, i have NO knowlege about how this stuff works. Plus, i dont now c++ sad
But i browsed through the code and found a file called 'window.cc' with this code:

      bool Window::activate(void) {
255             Server * server = Server::instance();
256             XEvent event;
257             long mask = SubstructureRedirectMask | SubstructureNotifyMask;
258     
259             event.xclient.type = ClientMessage;
260             event.xclient.serial = 0;
261             event.xclient.send_event = True;
262             event.xclient.display = server->display;
263             event.xclient.window = drawable;
264             event.xclient.message_type = server->net_active_window_atom;
265     
266             event.xclient.format = 32;
267             event.xclient.data.l[0] = 2;
268             event.xclient.data.l[1] = 0;
269             event.xclient.data.l[2] = 0;
270             event.xclient.data.l[3] = 0;
271             event.xclient.data.l[4] = 0;
272     
273             if (XSendEvent(server->display, server->root_window, False, mask, &event)) {
274                     return true;
275             }
276             return false;
277     }

and in 'server.cc' i found this:

28             // set up atoms
29             net_active_window_atom = XInternAtom(display, "_NET_ACTIVE_WINDOW", False);

So what i think is, one need to change the 'Window::activate(void) ' function to first switch desktop and then activate the window.

Maybe this is total nonsense ... i dont know hmm

Haench

Offline

#5 2008-05-16 11:42:32

SNP
Member
From: Athens / Greece
Registered: 2007-12-05
Posts: 18

Re: Visibility weird behavior after -Syu

Problem is, i have NO knowlege about how this stuff works. Plus, i dont now c++ sad

Same thing for me :<

Offline

#6 2008-05-16 17:46:19

haench
Member
Registered: 2008-05-02
Posts: 9

Re: Visibility weird behavior after -Syu

Hello,

maybe someone is interested: I fixed visibility's behavior with two easy lines in the code. As i'm not at all a programmer, i have to admid that i have ABSOLUTELY no clue if i did it right smile .

This is what I did:
In the visibility-file 'WindowIcon.cc' there is this function:

void WindowIcon::clicked_callback(::Window window) {
    if (window_is_active) {
        Window::get_window(client)->iconify();
        // XXX: HACK ALERT??
        // window_is_active = false;
    } else {
        Window::get_window(client)->activate();
    }
}

as the function name says, it is called if one clicks on an icon in visibility. there the window is activated (3 line from bottom). what i did then is to add some code to get the number of the desktop the clicked window is on. with this number i can chaneg desktop before the window is activated. Now the File looks like that:

void WindowIcon::clicked_callback(::Window window) {
    if (window_is_active) {
        Window::get_window(client)->iconify();
        // XXX: HACK ALERT??
        // window_is_active = false;
    } else {
         //--- 
         //Added by Haench
        CARD32 new_desktop =  Window::get_window(client)-> get_desktop();
        Server::instance()->set_current_desktop(new_desktop);
         // ----
        Window::get_window(client)->activate();
    }
}

For me this little fix works. Maybe someone might try this too ?

Haench

Offline

#7 2008-05-17 12:21:21

SNP
Member
From: Athens / Greece
Registered: 2007-12-05
Posts: 18

Re: Visibility weird behavior after -Syu

I'll give it a try sometime this week :>

Offline

#8 2008-05-17 18:03:20

dyzdyz
Banned
Registered: 2007-01-22
Posts: 20

Re: Visibility weird behavior after -Syu

I had this problem too. The haench's fix solved it. Thanks.

Offline

#9 2008-09-19 06:04:17

scooterpd
Member
Registered: 2008-09-01
Posts: 29

Re: Visibility weird behavior after -Syu

haench wrote:

In the visibility-file 'WindowIcon.cc' there is this function:...

This didnt work for me unfortunately.  i found a link to a python version, which seems to be updated more regularly (http://code.l3ib.org/?p=visibility-python.git;a=summary)
But i dont know how to install this at all, so i need some help.

All i want is to install visibility so that i can upgrade it easily along with my other packages, and so that when i click on an icon in an inactive desktop, it takes me to that desktop as opposed to moving that application to my current desktop.  or find an alternative to visibility that shows me what apps are on which desktops.

This is all pretty new to me, but i am trying to learn this stuff as i venture deeper.  any help would be greatly appreciated.

Offline

#10 2008-09-19 08:36:52

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Visibility weird behavior after -Syu

How did it not work for you ? You did compile it after you changed the code, right ?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#11 2008-09-19 15:09:49

scooterpd
Member
Registered: 2008-09-01
Posts: 29

Re: Visibility weird behavior after -Syu

moljac024 wrote:

How did it not work for you ? You did compile it after you changed the code, right ?

Ok, I'm an idiot.  Oops.  I do not know how to recompile.

Offline

#12 2008-09-19 16:13:48

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Visibility weird behavior after -Syu

scooterpd wrote:
moljac024 wrote:

How did it not work for you ? You did compile it after you changed the code, right ?

Ok, I'm an idiot.  Oops.  I do not know how to recompile.

I'm going to assume your not being sarcastic. You can install visibility with yaourt (a tool that automates installing from AUR). You can obtain it through AUR.

Then just install visibility with yaourt, enter the /var/abs/local/yaourtbuild/ directory, find the visibility dir there, change the source code, and then reinstall it with yaourt. This makes a nice package with those patched changes.

Or you could just install with the classic "./configure, make, make install" from the source dir. You don't need yaourt for this.


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#13 2008-09-19 16:43:57

scooterpd
Member
Registered: 2008-09-01
Posts: 29

Re: Visibility weird behavior after -Syu

moljac024 wrote:

Then just install visibility with yaourt, enter the /var/abs/local/yaourtbuild/ directory, find the visibility dir there, change the source code, and then reinstall it with yaourt.

Ok, i am installing using yaourt. during install i get prompted to edit the pkgbuild and it also prompts me to "Please add \ to your environment variables".  Do you know what that means?

Thank you very much for your help by the way.

Offline

#14 2008-09-19 16:59:36

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Visibility weird behavior after -Syu

You don't need to edit the PKGBUILD for this, but I assume it means the $EDITOR variable ?

Just set it with export $EDITOR=gvim for instance. Naturally replace gvim with whatever you use.


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#15 2008-09-19 17:21:25

scooterpd
Member
Registered: 2008-09-01
Posts: 29

Re: Visibility weird behavior after -Syu

Sweet.  Works like a charm.  Thanks a lot.

Offline

Board footer

Powered by FluxBB