Darrell, All
I've searched the code in attempt to find out where the titlebar information is created so it can be turned off to get clean screenshots. It is almost impossible. The titlebar information is set in tdebase/twin/client.cpp at line 2261. It is a minefield of what you may get for each window. It can be forced on a per-window basis in special window settings, but other than doing that manually for each screenshot, there are few options. It would be nice if there was a setting in Window Decorations that would allow this to be overridden, but I cannot find any such setting. If anybody know where a configuration option is hidden that will override setCaption, please let me know. This is what happens to set the window caption (note all the helpful comments in the code):
void Client::setCaption( const TQString& s, bool force ) { if ( s != cap_normal || force ) { bool reset_name = force; for( unsigned int i = 0; i < s.length(); ++i ) if( !s[ i ].isPrint()) s[ i ] = ' '; cap_normal = s; bool was_suffix = ( !cap_suffix.isEmpty()); TQString machine_suffix; if( wmClientMachine( false ) != "localhost" && !isLocalMachine( wmClientMachine( false ))) machine_suffix = " <@" + wmClientMachine( true ) + ">"; TQString shortcut_suffix = !shortcut().isNull() ? ( " {" + shortcut().toString() + "}" ) : ""; cap_suffix = machine_suffix + shortcut_suffix; if ( ( !isSpecialWindow() || isToolbar()) && workspace()->findClient( FetchNameInternalPredicate( this ))) { int i = 2; do { cap_suffix = machine_suffix + " <" + TQString::number(i) + ">" + shortcut_suffix; i++; } while ( workspace()->findClient( FetchNameInternalPredicate( this ))); info->setVisibleName( caption().utf8() ); reset_name = false; } if(( (was_suffix && cap_suffix.isEmpty()) || reset_name )) // if it was new window, it may have old value still set, if the window is reused { info->setVisibleName( "" ); // remove info->setVisibleIconName( "" ); // remove } else if( !cap_suffix.isEmpty() && !cap_iconic.isEmpty()) // keep the same suffix in iconic name if it's set info->setVisibleIconName( ( cap_iconic + cap_suffix ).utf8() );
if( isManaged() && decoration != NULL ) decoration->captionChange(); } }
I've searched the code in attempt to find out where the titlebar information is created so it can be turned off to get clean screenshots.
I don't understand the problem. Disable the "Include window decorations" option in kscreenshot and no window decorations get included in the capture.
Darrell
On 03/01/2014 01:20 PM, Darrell wrote:
I've searched the code in attempt to find out where the titlebar information is created so it can be turned off to get clean screenshots.
I don't understand the problem. Disable the "Include window decorations" option in kscreenshot and no window decorations get included in the capture.
Darrell
That's the easy solution, but I thought you wanted the whole window, including decorations, but without the user/directory information. That's easy enough.