Window movement restriction

Hello All,

I have installed fvwm 2.5.28 on my Ubuntu box.

I want to customize the behaviour of the window dragging.

I have only 1 screen … DeskTopSize 1x1

My monitor resoluation size 1248x1024.

  1. I want to have capability to move windows around the screen,
    but not above Y=100, and below Y=900.

  2. When I drag a window, there is a small popup on the top-right
    corner of the screen indicating the coordiates of the top-right corner
    of the window … I want to disable this popup …

Can the aboves be done via configuration setup? If not, any suggestion
where in the code I need to modify to accomplish the two tasks above?

Any help is greatly appreciated.

Thanks

TD

You can’t do this during move. Assuming this is an interactive move you could do something like this:

[code]Mouse foo bar baz MySpecialMove
DestroyFunc MySpecialMove
AddToFunc MySpecialMove

  • I PipeRead echo Move
  • I PipeRead [ $[w.x] -ge 400 ] && [ $[w.y] -ge 876 ] && \ echo "Move w-500 w+400"
    [/code]

Hence, you put the Move command in PipeRead so that FVWM blocks, and then test for the window’s position, and if it’s in an area you don’t like, move it elsewhere.

Come on…

HideGeometryWindow

No, because there’s no need to edit the code.

– Thomas Adam

Thank you very much for the response.

TD

Hi Thomas Adam,

I have another question …

The Alt-Tab has been built-in in the Fvwm … How would I disable
this function? In fact, I would like to disable any built-in Key bindings …
Can I do this via configuration or this has to need code modification?

Thanks,

T D

You can’t disable all of them, but if you fire up FVWM with:

fvwm -f /dev/null

Run:

PrintInfo Bindings

… and negate those in your config – i.e.:

Key foo bar baz -

That will remove some of them. As for your Alt-tab binding you’ll need to override that manually.

– Thomas Adam

Hi Thomas,

Thanks …

T D

Hi Thomas,

Thanks for the responses to my previous question … I have another question …

Can the font of app name on the title bar be modified (like make it bold, or
itatic , foreground color , etc … ) via configuation or it needs to modify the
code for this ?

Thanks

TD

Read up about colorsets. As for the font-style, there was a patch to do this via a Style line, but ultimately you can use FvwmEvent to change this based on whether the window has focus or not – see the “focus_change” event in “man FvwmEvent”.

It’s simple:

Colorset 0 ....
Colorset 1....

DestroyModuleConfig B:*
*B: focus_change Foo

AddToFunc StartFunction I Module FvwmEvent B

DestroyFunc Foo
AddToFunc Foo
+ I ThisWindow (...) WindowStyle Font ...., Colorset 1, etc
+ I Prev (AcceptsFocus, ....) WindowStyle Font ...., Colorset 0, etc
+ I UpdateStyles

You seem to always want to go and edit the code when there’s no need.

– Thomas Adam

Thanks,

TD

Hi Thomas.

I have another question to ask you for help … I have been trying different things and they do not seem to work for me …

As default configuration setting … and you have mulitple windows open … if you double
click on any window menu bar … => this window will loose focus and become inactive,
and other window will raise and become active in an order …

I want to disable this double click function … that is when I double click on the menu
bar of window A … the window A will remain raised/focused and active … and other
windows remain inactive …

How will I configure this ?

Thanks

T D

Depends – I’d need to see your config to know what mouse actions you have bound already.

– Thomas Adam

Dear Thomas,

Here are the only actions that I have configured for the mouse in my configure file (system.fvwm2rc, I have a very small file , we try to have a very simple fvwm environment)

Mouse 2 TF A A -
Mouse 1 F A A -
Mouse 1 R A -

Mouse 1 R A Menu Utilities mouse -lp -lp
Mouse 1 W M Menu Utilities mouse -lp -lp

Mouse 1 I A Function DeiconifyFocusAndRaise
Mouse 1 I M Function Raise

Thanks,

TD
[/quote]
Depends – I’d need to see your config to know what mouse actions you have bound already.

– Thomas Adam
[/quote]

Dear Thomas,

I wonder if I have the mouse actions configred properly so far?

Thanks,

TD

They say: “Patience is a virtue”. I am very busy at the moment with violin practise and other things, so please be patient – my time is severely limited.

– Thomas Adam