[compiz] [PATCH] Fix screenshot command

reggaemanu reggaemanu at gmail.com
Fri Apr 14 09:19:30 PDT 2006


2006/4/14, Dan Winship <danw at novell.com>:
>
> reggaemanu wrote:
> > Here is a patch to fix the segfault issue with command_screenshot and
> > window_command_screenshot.
>
> Er? What segfault issue? Was this brought up somewhere else?


Yes, on some forums/irc, try it...nobody can use the Screenshot command,
that definitely broke compiz.
And for sure...look the code carefuly :
for the moment...Print try to run COMP_DISPLAY_OPTION_RUN_COMMAND_SCREENSHOT
instead of  COMP_DISPLAY_OPTION_COMMAND_SCREENSHOT, but it's the shortcut
keys, not the command (same problem for <Alt>Print)...so this should never
work and compiz doesn't like that...

> It also avoid the conflict between this two functions if both contain
> > the same key (Print and <Alt>Print for example)
> > (actually if you press <Alt>Print both commands are triggered)
>
> Hm... but it just switches the problem around, right? So that if you
> swapped the bindings so that "Print" was "run_command_window_screenshot"
> and "<Alt>Print" was "run_command_screenshot", then "<Alt>Print" would
> trigger both of them? To really fix it, it needs to be checking that
> there are no extraneous modifiers held down. Then it can check the
> bindings in any order and it will work, regardless of what keys are
> bound to what.


Hum, now you say that, yes you are right, it's just a (temporary !?) fix for
the defaults shortcut, but at least it's better than the actual code since
you have one possibility to use both of shortcut (actualy even if we fix the
above problem we definitely can't), i will take a quick look to see if I can
do it better.
Anyway, i'm not a coder and don't know anything about C language, so if you
can do it in a better way...just do it ;)

-- Dan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/compiz/attachments/20060414/6bc04d1f/attachment.html


More information about the compiz mailing list