Skip to content

Group option nodrag being unset by _MOTIF_WM_HINTS. #674

@eslafgh

Description

@eslafgh

On a website I use I need Alt+Button1 to move things around so I set nodrag for chrome.

 <Group>
  <Class>Google-chrome</Class>
  <Option>nodrag</Option>
 </Group>

This worked until recently (was OK 2 months ago) but now Alt+Button1 moves the window, it broke with chrome-144 I believe.

Debugging jwm-2.4.6 to see what happens to the state.status of the chrome ClientNode I observe that STAT_NODRAG is being set correctly but then it is unset when a _MOTIF_WM_HINTS causes the ClientNode state to be updated.

(gdb) c
Continuing.

Thread 1 "jwm" hit Hardware watchpoint 2: -location np->state.status

Old value = 0x20006003
New value = 0x6002
0x000055555556d229 in UpdateState (np=0x5555555f1ac8) at event.c:1715
1715	   np->state = ReadWindowState(np->window, alreadyMapped);
(gdb) bt
#0  0x000055555556d229 in UpdateState (np=0x5555555f1ac8) at event.c:1715
#1  0x000055555556eb3f in HandlePropertyNotify (event=0x7fffffffdb60) at event.c:1040
#2  WaitForEvent (event=event@entry=0x7fffffffdb60) at event.c:147
#3  0x000055555555e518 in EventLoop () at main.c:249
#4  main (argc=<optimized out>, argv=0x7fffffffdd78) at main.c:195

I can also reproduce the problem by setting nodrag for another applications and then sending a _MOTIF_WM_HINTS using xprop i.e.

xprop -id "${win_id}" -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"

As a work around if I restart jwm with chrome already running the nodrag works as expected post restart. I assume chrome only sends the _MOTIF_WM_HINTS at startup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions