weixin_39979159
2020-12-25 17:51 阅读 3

Rectangle select not working in MtPaint

If you open an image in MtPaint and choose to select a rectangular area which, for instance, you want to crop, the cursor changes correctly to the cross hair however no area is marked where you want to select. This happens every time and has been apparent at least since r810 and still in r815. Gimp does not have the problem. MtPaint has never had the problem before. Actually, most of MtPaint is unusable, can't draw either. Anything requiring pointer inside the canvas device does not work. I have debug enabled and the only thing I can see bad is "DEBUG: Unknown event type: 34". No compositor is running. One more unusual thing, perhaps (or not) related. All TrayButtons turn black now when clicked, any theme. Here is some debug output: DEBUG: Unknown _NET_WM_WINDOW_TYPE: 349 DEBUG: Unknown _NET_WM_WINDOW_TYPE: 349 DEBUG: Unknown _NET_WM_WINDOW_TYPE: 349 DEBUG: XError: BadWindow (invalid Window parameter) DEBUG: Request Code: 42 (X_SetInputFocus) DEBUG: Minor Code: 0 DEBUG: Resource ID: 0x1e004b7 DEBUG: Error Serial: 299830 DEBUG: CHECKPOINT LIST (oldest) DEBUG: event.c[111] DEBUG: event.c[123] DEBUG: event.c[111] DEBUG: event.c[123] DEBUG: event.c[111] DEBUG: event.c[123] DEBUG: grab.c[19] DEBUG: grab.c[20] DEBUG: END OF CHECKPOINT LIST (most recent) DEBUG: XError: BadWindow (invalid Window parameter) DEBUG: Request Code: 25 (X_SendEvent) DEBUG: Minor Code: 0 DEBUG: Resource ID: 0x1e004b7 DEBUG: Error Serial: 299831 DEBUG: CHECKPOINT LIST (oldest) DEBUG: event.c[111] DEBUG: event.c[123] DEBUG: event.c[111] DEBUG: event.c[123] DEBUG: event.c[111] DEBUG: event.c[123] DEBUG: grab.c[19] DEBUG: grab.c[20] DEBUG: END OF CHECKPOINT LIST (most recent) DEBUG: XError: BadWindow (invalid Window parameter) DEBUG: Request Code: 42 (X_SetInputFocus) DEBUG: Minor Code: 0 DEBUG: Resource ID: 0x1e004ba DEBUG: Error Serial: 300975 DEBUG: CHECKPOINT LIST (oldest) DEBUG: event.c[111] DEBUG: event.c[123] DEBUG: event.c[111] DEBUG: event.c[123] DEBUG: event.c[111] DEBUG: event.c[123] DEBUG: grab.c[19] DEBUG: grab.c[20] DEBUG: END OF CHECKPOINT LIST (most recent) DEBUG: XError: BadWindow (invalid Window parameter) DEBUG: Request Code: 25 (X_SendEvent) DEBUG: Minor Code: 0 DEBUG: Resource ID: 0x1e004ba DEBUG: Error Serial: 300976 DEBUG: CHECKPOINT LIST (oldest) DEBUG: event.c[111] DEBUG: event.c[123] DEBUG: event.c[111] DEBUG: event.c[123] DEBUG: event.c[111] DEBUG: event.c[123] DEBUG: grab.c[19] DEBUG: grab.c[20] DEBUG: END OF CHECKPOINT LIST (most recent)

Thanks!

该提问来源于开源项目:joewing/jwm

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

4条回答 默认 最新

  • weixin_39610631 weixin_39610631 2020-12-25 17:51

    What version of mtpaint is this? Also, are you using sloppy focus or click focus? I can't say I've used mtpaint before, but I just tried 3.40 and it seems to work. I'll play with it some more though.

    As far as the tray buttons turning black, I would guess that's due to the fix for issue #61. TrayButtonStyle now inherits from TrayStyle instead of TaskListStyle.

    点赞 评论 复制链接分享
  • weixin_39979159 weixin_39979159 2020-12-25 17:51

    For the record it was mtpaint 3.44.04, just got latest from git (3.44.13) and it was the same. Rolled back jwm and the same. Immediately I figured it is not a jwm bug but corruption of my mtpaint settings. Sorry about that. {embarrassed emoticon}

    However, my other mentioned issue about tray buttons is a bit of a problem. Not only do they turn black on click but they have lost gradient from the theme and also it seems if an icon isn't square that it is scaled differently now. Best way to explain is to show a screen cap. (the dog smiley icon is 47x35 in png format). jwm-786 jwm-r786 jwm-815 jwm-r815 Thanks

    点赞 评论 复制链接分享
  • weixin_39610631 weixin_39610631 2020-12-25 17:51

    As far as the colors go, the colors for tray buttons is controlled by TrayButtonStyle, which was an undocumented feature, so probably not used (it's documented now though). It used to be the case that when a setting wasn't in TrayButtonStyle, the colors for tray buttons would come from TaskListStyle, but that was really a pretty arbitrary choice as mentioned in issue #61. Now the defaults come from TrayStyle instead and so the tray buttons will look just like the tray if their settings are not overridden explicitly. It's also now possible to specify gradients and ActiveBackground/ActiveForeground in TrayStyle though. So one way to fix this would be to move the settings from TaskListStyle to TrayStyle. Another option would be to simply duplicate them in TrayButtonStyle. I have to admit that I'm not completely happy with the way this works right now. In a way it seems odd that the background color for tray buttons would come from the tray itself, but that does make sense for flat buttons, so maybe it's ok. I think this makes more sense than having TrayButtonStyle take defaults from TaskListStyle.

    As far as the image scaling is concerned, it was broken before. For icons that are wider than they are tall, it wouldn't have made much difference (as can be seen here), but for icons that were too tall, it was pretty obvious that the scaling was broken. The height of the dog icon should match the height of the other icons now. Going forward, there are probably a couple more pixels I could allow icons to use in trays and perhaps it should be a percentage rather than a fixed amount so that things look right at high resolutions.

    点赞 评论 复制链接分享
  • weixin_39979159 weixin_39979159 2020-12-25 17:51

    Thanks for the updated documentation. So now I have added to my theme and all is well;

    
    <traybuttonstyle> 
       <font>DejaVu Sans 12</font> 
       <foreground>black</foreground> 
       <background>#DCDAD5:#A4A4A4</background> 
       <activeforeground>black</activeforeground> 
       <activebackground>#FFFFFF:#A4A4A4</activebackground> 
    </traybuttonstyle> 
    
    点赞 评论 复制链接分享

相关推荐