mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +01:00
Add a screenshot capture feature
This patch adds a feature to take screenshots directly from Window Maker. Having the feature embeded direclty inside Window Maker allows us to take advantage of how Window Maker is managing and handling Windows. Three new actions can be bound to a key shortcut from WPrefs. The screenshot files are saved in ~/GNUstep/Library/WindowMaker/Screenshots/ dir, with a "screenshot_%Y-%m-%d_at_%H:%M:%S" format followed by the extension. Preferably as a PNG or JPG file if available. Meaning, to work Window Maker via WRaster needs to support at least one of those format. "Capture the entire screen" is quite standard, it takes a screenshot of the whole screen area (even in multiheads env). "Capture a portion of the screen" requires the user to draw a rectangle which will be captured. Those two first are quite straightforward, just taking a live picture of the screen. The last one is "Capture a window" which works in best effort mode, it catures the focused window. As Window Maker by default is not using any compositor (like for example Xcompmgr) it can only dump the content displayed on the screen. If a window is minimized or out of the screen, there is high chance the image will be split or some area greyed in case other windows overlapped it.
This commit is contained in:
committed by
Carlos R. Mafra
parent
6c69dc32a0
commit
d045ffcf7d
@@ -158,7 +158,10 @@ static struct keyOption {
|
||||
{ "RunKey", N_("Run application") },
|
||||
{ "ExitKey", N_("Exit Window Maker") },
|
||||
{ "DockRaiseLowerKey", N_("Raise/Lower Dock") },
|
||||
{ "ClipRaiseLowerKey", N_("Raise/Lower Clip") }
|
||||
{ "ClipRaiseLowerKey", N_("Raise/Lower Clip") },
|
||||
{ "ScreenCaptureKey", N_("Capture the entire screen") },
|
||||
{ "WindowCaptureKey", N_("Capture a window") },
|
||||
{ "PartialCaptureKey", N_("Capture a portion of the screen") }
|
||||
#ifdef XKB_MODELOCK
|
||||
,{ "ToggleKbdModeKey", N_("Toggle keyboard language") }
|
||||
#endif /* XKB_MODELOCK */
|
||||
|
||||
Reference in New Issue
Block a user