Problem with resolution in 3.5" and 5" displays

Hay all,
i am using raspberry pi with Ubuntu mate OS along with displays of 5 inch display and 3.5 inch display.
There is a problem with the resolution of displays, that is when I open/select an folder or any other application the window size remains same as the size for the 15 inch display of laptop. Is it any option of reduce the window size according to the display size.
Since the display is small the windows open goes out-off the display size for both 3.5 inch and 5 inch display. It is little difficult for me, when i run a python code to capture an image (which is my project work) the half of the window goes out-off the display. there is no problem when I run the program in laptop the window size has no problem, but when comes to the this both display the windows goes out off the display resolution.
I like to know is it possible reduce the window size according to the display size?

Thanks in advance

Does the desktop with the typical “Applications Places System” etc menus (UM 16.04) fit nicely on your Raspberry screens?

Do you connect the Raspberry to both the 5 inch display and 3.5 inch display at the same time?

What happens when you click on the square symbol at the top of your windows?

No i have connect both screen one after other.

square symbol at the top of your windows???

i am using waveshare display

Well, I'm not sure about the Raspberry flavour of UM, but on mine, every window has these icons at the top left (you can also make it top right using Mate Tweak):

If you click on the third icon from the left (next to the M of MATE Tweak) then the window will expand or shrink to fill the display. If you click again, it will revert to its previous dimensions. Or vice versa.