Q:

Find Screen resolution covered by an application

I found that to find the screen resolution, we do either 
xdpyinfo  | grep 'dimensions:'

or 
xrandr | grep '*'

But how do I find how much part of my screen resolution is covered by an application?
Like I want to determine how much resolution is covered by a GUI application on my monitor ? 
Say, I want to determine how much resolution Firefox covers while maximized and while changing to my preferable dimension. 
And also say, I want to determine the screen resolution covered by a website inside the web browser.

A:

Run xwininfo in a terminal and click in the window you want information about.  This will require the window to be visible, so you may need to use Alt-Tab or similar (anything that doesn't involve clicking with the mouse).
e.g. I just ran xwininfo and clicked in the Chromium browser window I'm typing this into:
$ xwininfo

xwininfo: Please select the window about which you
          would like information by clicking the
          mouse in that window.

xwininfo: Window id: 0x640001a "Find Screen resolution covered by an application - Unix & Linux Stack Exchange - Chromium"

  Absolute upper-left X:  627
  Absolute upper-left Y:  59
  Relative upper-left X:  4
  Relative upper-left Y:  24
  Width: 1603
  Height: 1342
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +627+59  -1380+59  -1380-279  +627-279
  -geometry 1603x1342+623+35

BTW, xwininfo is mentioned in the "SEE ALSO" section of xdypinfo's man page.  It always pays to read the documentation :)
From man xdpyinfo: 

SEE ALSO
   X(7), xprop(1), xrdb(1), xwininfo(1), xrandr(1),
   xdriinfo(1), xvinfo(1), glxinfo(1)

xwininfo's man page also mentions xdpyinfo.  They're both standard tools in x11-utils.

