BACKGROUND: I am on a 1280x1024 monitor. Xorg and all of its components are the newest versions. JWM is configured to have an auto-hiding taskbar across the bottom of the screen.
SCENARIO 1: I start X with no special command line, which results in the native resolution (1280x1024). In a terminal, I enter "xrandr -s 800x600". The screen goes black for half a second, then comes back with 800x600 resolution. I move the mouse pointer to the bottom of the screen, expecting that the taskbar will pop up. But no taskbar shows. Other than that everything works as normal, I can move all windows, and a mouse-click on the desktop brings up JWM's desktop menu.
SCENARIO 2: I add the line "xrandr -s 800x600" to .xinitrc, immediately before the line "jwm". Then I start X. It comes up with 800x600 resolution and the taskbar pops up at the bottom, just as expected. Now I enter "xrandr -s 1280x1024" in a terminal. The screen goes black for half a second, then comes back with the requested resolution. But: JWM continues to use the old, smaller resolution -- it uses the top-left rectangle of the screen that (by eye-balling) corresponds to 800x600 pixels. The taskbar is visible all of the time at the bottom of that rectangle, and also has that rectangle's width. Moving the mouse pointer over the taskbar makes the taskbar pop up at that place. Everything else works as expected, except that all new windows are placed initially within the top-left rectangle (but I can move them outside afterwards).
REPLICABLE: for me, always, 100%. But note that a success report has been given here:
REMEDIES: None. According to the changelog, the window manager should handle the changed screen resolution all by itself, but it doesn't. Manually running "jwm -reload" or "jwm -restart" in a terminal doesn't help, either.
PROBLEM ANALYSIS: After the above observations, I instrumented JWM with a few debug statements. These lead me to the following conclusions. On startup, JWM reads in the screen resolution in the function "OpenConnection" in main.c. This function is called once, at program start, and then never again. That is important: "OpenConnection" is called from "StartupConnection" which is *outside* the main loop (!!!). When a RandR event reaches the event handler ("WaitForEvent" in event.c), JWM does all shutdown/startup steps that are handled inside the main loop in main.c. Re-reading the screen resolution isn't inside the main loop (it is outside), and therefore never takes place. Therefore, the running window manager continues to use the old resolution. -- You may now argue that "OpenConnection" is also called when restart / reload / exit events are sent to the desktop with the "SendJWMMessage" function (also in main.c), and that the new screen resolution must be read in when this function is called. To this I answer that "SendJWMMessage" is never called by the running window manager. Instead, it is only called from secondary copies of the program, for example when I manually run "jwm -restart" in a terminal. This secondary copy then does in fact know about the new screen resolution for the split second that it runs, but it does not transfer this information to the running window manager.
I readily admit that I may overlook something.
Log in to post a comment.