果然发现了datetime走后门的证据!!!
Tofloor
poster avatar
q77190858
deepin
2020-10-25 07:12
Author
更新1003以后,网速插件忽然无法正常宽度显示了,于是我自己研究了官方的dde-dock插件,主要是datetime插件,因为它的宽度也超过了正常一个图标的宽度,可是却没有被遮挡,于是我也模仿datetime插件,在网速插件里面重载sizehint,返回正常的宽度和高度size,可是还是只要dock出现新的图标就被遮挡

于是我开始怀疑是dde-dock搞得鬼,给datetime插件开了后门

于是我下载了dde-dock的源码,安装了各种依赖编译了一遍dde-dock,使用自己编译的datetime也是正常显示

我在dde-dock源码里面全局搜索“datetime”字符串,结果出来了一个不在datetime插件里面的结果非常可疑



根据语义判断,datetime插件才使用他自己返回的sizehint,否则就返回默认托盘的大小,这应该是datetime走后门的证据了吧

为了证明我的判断,我进一步,把网速插件的返回名字改成datetime。

如果我的猜想是对的,这样应该就可以不被遮挡了



结果编译安装插件以后,果然就不会被遮挡了,dock出现新的图标也不会遮挡了,心心念念几天的bug终于找到了



此处我的发现仅供官方参考,希望官方能尽快修复这个问题

Reply Favorite View the author
All Replies
1 / 2
To page
观摩
deepin
2020-10-25 07:32
#1
这代码逻辑很严谨  
Reply View the author
mmlmonkey
deepin
2020-10-25 07:34
#2
啊这 这个应该是dde—dock对于datetime的特殊处理 没考虑别的插件而已   不过不该是给PluginsItem加一个属性来区分是否为不定长图标吗 deepin的猿好懒惰啊
Reply View the author
ltree
deepin
2020-10-25 07:49
#3
嗯嗯,官方加一个接口也是很好玩的,以后只要收录管理就行了,喜欢的人会不断的写写炫酷的插件
Reply View the author
wantianwanchen
deepin
2020-10-25 08:02
#4
我之前还去你github(https://github.com/q77190858/dde-sys-monitor-plugin)反馈了问题,没想到是官方的问题,还给了datetime特殊待遇,只能等官方修复了

临时解决办法:拉高dock栏高度,可以规避每次刷新都闪烁的问题,而且拉高的不多,可以接受

希望官方快点解决吧
Reply View the author
忘记、过去
Moderator
2020-10-25 08:04
#5
大佬牛逼~坐等后面抄作业 XD......
Reply View the author
海天鹰
deepin
2020-10-25 08:11
#6
本帖最后由 sonichy 于 2020-10-25 00:29 编辑

海天鹰复盘BUG,真实有效!
过节扣工资,真悲哀。
第三方、过宽的Dock插件宽度不足临时解决方案:pluginName 改成 datetime
  1. const QString DatetimePlugin::pluginName() const
  2. {
  3.     return "datetime";
  4. }
Copy the Code


Reply View the author
随便逛逛
deepin
2020-10-25 09:53
#7
这应该不算bug吧...谁通知下插件作者改改呗...
Reply View the author
随便逛逛
deepin
2020-10-25 09:53
#8
https://bbs.deepin.org/post/204354
海天鹰复盘BUG,真实有效!
过节扣工资,真悲哀。
第三方、过宽的Dock插件宽度不足临时解决方案:pluginNam ...

把你改好的放上来也行呀...
Reply View the author
zhangn1985
deepin
2020-10-25 16:34
#9
这个挺牛的。。。
Reply View the author
jingle
deepin
2020-10-25 17:03
#10
Reply View the author
Fredoong
deepin
2020-10-25 19:53
#11
Deepin开发团队这是想让所有论坛友的插件以后都伪装成datetime。
Reply View the author
Comments
windcz91
2020-10-25 21:36
哈哈哈开发团队为了赶进度只好先偷个懒
wzb
deepin
2020-10-25 20:23
#12
要是不考虑社区开发人员,那deepin就走到头了
Reply View the author
神末shenmo
Moderator
Spark-App
2020-10-25 20:30
#13
https://bbs.deepin.org/post/204354
Deepin开发团队这是想让所有论坛友的插件以后都伪装成datetime。

下面是新开发的插件
日期时间
日期时间
日期时间
日期时间
日期时间
日期时间
日期时间
日期时间

大家喜欢么?
Reply View the author
q77190858
deepin
2020-10-25 21:06
#14
https://bbs.deepin.org/post/204354
把你改好的放上来也行呀...

暂时改好了,去我原帖或者github。gitee下载即可
Reply View the author
随便逛逛
deepin
2020-10-25 21:16
#15
https://bbs.deepin.org/post/204354
暂时改好了,去我原帖或者github。gitee下载即可

原帖在哪?地址在哪?....
Reply View the author
q77190858
deepin
2020-10-25 21:22
#16
https://bbs.deepin.org/post/204354
原帖在哪?地址在哪?....

看我的签名
Reply View the author
随便逛逛
deepin
2020-10-25 21:31
#17
本帖最后由 haohu1193 于 2020-10-25 13:36 编辑

终于不闪了...感谢...

项目地址:https://gitee.com/q77190858/dde-sys-monitor-plugin

libsys_monitor.so 插件下载:https://gitee.com/q77190858/dde- ... n/libsys_monitor.so

安装命令(已下载的文件目录内鼠标反键,终端运行以下命令...)
sudo cp libsys_monitor.so /usr/lib/dde-dock/plugins/


目前dock会自动重启...以下步骤可以作为备用项...
pkill dde-dock
dde-dock
Reply View the author
随便逛逛
deepin
2020-10-25 21:42
#18
这个参数的特权似乎没有任何限制...字体大小高度随意调节...


Reply View the author
q77190858
deepin
2020-10-25 21:58
#19
https://bbs.deepin.org/post/204354
这个参数的特权似乎没有任何限制...字体大小高度随意调节...

终于回到15.11那种无拘无束的感觉了
Reply View the author
随便逛逛
deepin
2020-10-25 22:07
#20
https://bbs.deepin.org/post/204354
终于回到15.11那种无拘无束的感觉了

这一波是上游的变动吧...貌似deepin也在懵逼中啊...
Reply View the author
1 / 2
To page