Skip to content

Commit

Permalink
absolute geometry: update screen
Browse files Browse the repository at this point in the history
Tell the client which screen it is on, prior to its geometry being
updated here.  Certain callers, when updating a window's geometry,
bypass some of the sanity checks, and the screen assignment gets
outdated.

Fixes #473
  • Loading branch information
ThomasAdam committed Apr 10, 2021
1 parent 2bae129 commit 36bd27b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion fvwm/geometry.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "borders.h"
#include "icons.h"
#include "add_window.h"
#include "virtual.h"

/* ---------------------------- local definitions -------------------------- */

Expand Down Expand Up @@ -599,7 +600,15 @@ void update_absolute_geometry(FvwmWindow *fw)
{
rectangle *dest_g;
rectangle frame_g;
struct monitor *m = (fw && fw->m) ? fw->m : monitor_get_current();
struct monitor *m;

/* Tell the client which screen it is on, prior to its geometry being
* updated here. Certain callers, when updating a window's geometry,
* bypass some of the sanity checks, and the screen assignment gets
* outdated.
*/
UPDATE_FVWM_SCREEN(fw);
m = (fw && fw->m) ? fw->m : monitor_get_current();

/* store orig values in absolute coords */
dest_g = (IS_MAXIMIZED(fw)) ? &fw->g.max : &fw->g.normal;
Expand Down

0 comments on commit 36bd27b

Please sign in to comment.